Rekstrarhandbók

Total Page:16

File Type:pdf, Size:1020Kb

Rekstrarhandbók Vorönn 2017 T-404-LOKA, Lokaverkefni Rekstrarhandbók Ingþór Birkir Árnason Jan Hinrik Hansen Logi Guðmann Þorgrímur Jónasarson Kennari: Hallgrímur Arnalds Leiðbeinandi: Sigurjón Ingi Garðarsson Prófdómari: Símon Óttar Vésteinsson 12. maí 2017 Efnisyfirlit 1 Framendi 3 1.1 Dependencies 3 1.2 Uppsetning 3 1.3 Keyrsla 3 1.4 ESLint 4 1.5 Stílar 5 1.5.1 BEM - Block Element Modifier 5 1.5.2 StyleLint 5 1.5.3 Gulp task 5 2 Bakendi 6 2.1 Dependencies 6 2.2 Uppsetning 6 2.3 Handhægar upplýsingar 8 2.3.1 Admin aðgangur 8 2.3.2 Postman 8 2.4 PHPUnit 8 2.5 Documentation 9 3 Forritunarreglur 9 3.1 Almennar reglur 9 3.2 VueJS 9 3.3 CSS 10 3.4 PHP - Laravel 11 2 1 Framendi Framendinn er skrifaður í Vue.js með vue-webpack-boilerplate (https://github.com/vuejs-templates/webpack) sem grunn. ​ ​ 1.1 Dependencies Til þess að geta keyrt framendann er nauðsynlegt að hafa node og node package manager (npm). Hægt er að sækja node.js ásamt npm á Node.js heimasíðunni (https://nodejs.org/en/). ​ ​ 1.2 Uppsetning 1.) Sækja git repository-ið. git clone https://github.com/toggi737/Lokaverkefni_vue.git 2.) Setja upp nauðsynleg dependencies í gegnum npm. npm install 3.) Búa til dev.env.js skrá sem að inniheldur stillingar fyrir þína vél. Nauðsynlegt er að búa til dev.env.js skrá undir config möppunni sem að inniheldur upplýsingar um þann API sem að þú vilt nota. Það er hægt að gera með því að keyra cp dev.env.js.example dev.env.js í config möppunni. Hér má sjá dæmi um skránna ef nota á production API-inn. var merge = require('webpack-merge') ​ ​ ​ ​ ​ ​ var prodEnv = require('./prod.env') ​ ​ ​ ​ ​ ​ module.exports = merge(prodEnv, { ​ ​ ​ ​ ​ ​ ​ ​ NODE_ENV: '"development"', ​ ​ ​ API: '"https://api.dagbokin.is/v1"', ​ ​ ​ }); 3 Passa þarf upp á að hafa bæði einfaldar og tvöfaldar gæsalappir utan um API strenginn eins og sjá má hér fyrir ofan. 1.3 Keyrsla Eftir þessi skref hér að ofan ætti framendinn að vera tilbúinn til keyrslu. Til þess að keyra framendann upp í development mode má keyra npm run dev Þá ætti framendinn að opnast í vafra á vélinni þinni með URL-ið http://localhost:8080 Til þess að build-a framendann fyrir production er svo hægt að keyra npm run build 1.4 ESLint Kerfið kemur með ESLint config-i sem að passar upp á að JavaScript kóði sé alltaf með sama stílnum. Config-ið sem er í notkun byggir á eslint configi frá Sindre Sorhus sem að kallast xo https://github.com/sindresorhus/eslint-config-xo, en er þó með örlitlum breytingum. ​ Hægt er að setja upp ESLint plugin í mörgum editorum sem að sýnir manni villu um leið og maður brýtur einhverja reglu, en einnig failar build-ið og birtast skilaboð í vafranum, sé einhver regla brotin. Hentugt getur verið að slökkva á eslint í ákveðnum file eða línu á meðan maður er að forrita, en forðast skal að push-a því inn á master. Til þess að slökkva á eslint í heilum file má bæta við /* eslint-disable */ efst í viðkomandi file. Til þess að slökkva á eslint í .vue skrá skal þessi lína vera sett efst í <script> tag-ið. Til þess að slökkva á eslint í ákveðinni línu er hægt að bæta við // eslint-disable-line 4 aftast í línuna. Til þess að keyra ESLint á alla JavaScriptu í projectinu er einnig hægt að keyra npm run lint í skelinni í rótinni á projectinu. 5 1.5 Stílar Flestallir stílar í kerfinu eru skrifaðir í SASS með SCSS syntax. Undir src/styles möppunni má finna skránna theme.scss þar sem öll import fyrir aðra stíla skulu vera. Stílar fyrir hvern component skulu svo vera í sér skrá samhliða .vue skránni fyrir þann component. 1.5.1 BEM - Block Element Modifier Stílar í kerfinu skulu vera skrifaðir með BEM hefðinni. Hægt er að lesa um BEM á heimasíðunni þeirra http://getbem.com/. Þetta hjálpar meðal annars til við endurnýtingu á stílum. ​ 1.5.2 StyleLint StyleLint er í notkun á projectinu til að passa upp á að format á stílum sé alltaf eins. Config-ið sem er í noktun byggir á config-i sem að kallast stylelint-config-standard https://github.com/stylelint/stylelint-config-standard, en töluverðar breytingar hafa verið gerðar á ​ því. Við bættum einnig við plugin-i á StyleLint sem að kallast stylelint-order og passar upp á röðun á CSS property-unum, en við stilltum röðunina á property-unum sjálfir. Til þess að keyra StyleLint á alla stíla í projectinu er hægt að keyra npm run lint:scss í skelinni í rótinni á projectinu. Einnig er hægt að setja upp StyleLint plugin í mörgum editorum sem að kvartar um leið og maður brýtur einhverja reglu. 1.5.3 Gulp task Til þess að auðvelda manni að fylgja öllum þessum stylelint reglum bjuggum við til gulp task sem að lagar allar helstu villurnar fyrir mann. Einnig raðar það CSS property-unum upp í rétta röð. Til þess að geta keyrt þetta task er nauðsynlegt að hafa gulp uppsett á vélinni, en það er hægt að sækja gulp með því að keyra npm install gulp -g 6 Til þess að keyra taskið má svo keyra gulp styles í rótinni á projectinu, en þetta keyrir á alla stíla í projectinu. Einnig er hægt að senda inn færibreyturnar stylesSrc og stylesDest til þess að keyra taskið á staka file-a eða ákveðnar möppur. gulp styles --stylesSrc 'src/components/auth/*.scss' --stylesDest ​ ​ ​ ​ ​ ​ 'src/components/auth' 2 Bakendi Bakendinn er skrifaður í Laravel 5.4, með apiato pakkann (http://apiato.io) sem grunn. ​ ​ 2.1 Dependencies Hér má sjá lista yfir þau forrit og pakka sem að þurfa að vera til staðar til þess að setja upp bakendann. ● PHP 7.1 ● Composer ● Nginx eða Apache ● MySql ● Sqlite3 fyrir phpunit test Leiðbeiningar um uppsetningu á þessum tólum má finna á netinu. Einnig er hægt að nýta sér Docker með Laradock eða Vagrant með Laravel Homestead, en það eru pakkar/virtual vélar sem að koma með öllum þessum dependencies uppsettum. 2.2 Uppsetning Leiðbeiningar um uppsetningu má nálgast hér http://apiato.io/A.getting-started/installation. Þarna ​ ​ inni má einnig finna kafla um uppsetningu í gegnum Docker og Vagrant. Eftir að hafa sett upp öll dependencies þarf að fylgja eftirfarandi skrefum til þess að setja upp bakendann. 1.) Sækja git repository-ið. git clone https://github.com/toggi737/Lokaverkefni_hello.git 7 2.) Setja upp nauðsynleg dependencies í gegnum composer. composer install 3.) Búa til gagnagrunn fyrir kerfið í MySQL. Það er til dæmis hægt að gera með því að keyra eftirfarandi skipun í MySQL skelinni. create database dagbokin; Eða með því að keyra mysql -u root -p -e "create database dagbokin;" ​ í skelinni. 4.) Búa til .env skrá sem að inniheldur stillingar fyrir þína vél. Gott er að byrja á því að afrita example .env skránna með því að keyra cp .env.example .env Því næst þarf að opna .env skránna og fylla út helstu stillingar. Hér fyrir neðan má sjá lista yfir helstu atriðin sem að gæti þurft að stilla til. Nafn á kerfinu ásamt url-um. Url-in geta verið mismunandi eftir uppsetningu á local umhverfi. APP_NAME="dagbokin" APP_URL=http://dagbokin.dev API_URL=http://api.dagbokin.dev (Í sumum tilfellum þarf að eiga við ‘hosts’ skránna í stýrikerfinu til þess að benda þessum URL-um yfir á localhost (127.0.0.1)). Upplýsingar um gagnagrunnstengingu. Þessar upplýsingar þurfa að vera í samræmi við MySQL gagnagrunninn á þinni vél. DB_HOST=localhost DB_PORT=3306 DB_DATABASE=dagbokin DB_USERNAME=root 8 DB_PASSWORD=root Einnig þarf APP_KEY að vera til staðar í skránni, en hann má fá með því að keyra php artisan key:generate í skelinni. 4.) Setja upp gagnagrunn. Til þess að setja upp töflur í gagnagrunninum þarf að keyra php artisan migrate Til þess að fá inn nauðsynleg gögn í gagnagrunninn, eins og til dæmis Admin userinn má keyra php artisan db:seed Ef að þú vilt fá inn demo gögn í kerfið má keyra php artisan apiato:seed-test 9 5.) Setja upp OAuth Til þess að innskráning og fleira virki rétt í kerfinu þarf að setja upp OAuth encryption keys, og clients, sem eru svo notaðir til þess að búa til access tokens. Þetta má gera með því að keyra php artisan passport:install Eftir þessi skref ætti kerfið að vera tilbúið til keyrslu. Áður en að hafist er handa að vinna í bakendanum er mjög gagnlegt að lesa í gegnum Porto hönnunarmynstrið, en það má finna hér https://github.com/Mahmoudz/Porto. Einnig má finna ýmsar ​ ​ upplýsingar um uppbyggingu á kerfinu og fleira hér http://apiato.io/. ​ ​ 2.3 Handhægar upplýsingar 2.3.1 Admin aðgangur Default admin username og password á kerfinu eftir uppsetningu er username: [email protected] ​ password: gunnasig ​ 2.3.2 Postman Gott er að nota Postman tólið (https://www.getpostman.com/) til þess að senda requestur á ​ ​ bakendann. 2.4 PHPUnit Til þess að keyra öll test fyrir bakendann má keyra vendor/bin/phpunit í rótinni á repository-inu. Einnig er hægt að filter-a test út frá nafni með því að keyra vendor/bin/phpunit --filter TestName ​ 10 2.5 Documentation Öll skjölun um endapunkta er geymd samhliða PHP kóðanum fyrir viðeigandi endapunkt. Til þess að búa til documentation síðu út frá þeim gögnum, notum við tól sem að heitir apiDoc. Það er node pakki og má setja upp í gegnum node package manager (npm) með því að keyra npm install apidoc -g Til þess að búa svo til skjölunarsíðuna er hægt að keyra php artisan apiato:docs Þar má finna upplýsingar um alla endapunkta í kerfinu ásamt öðrum handhægum upplýsingum fyrir þá sem þurf að nota api-inn.
Recommended publications
  • Learning React Functional Web Development with React and Redux
    Learning React Functional Web Development with React and Redux Alex Banks and Eve Porcello Beijing Boston Farnham Sebastopol Tokyo Learning React by Alex Banks and Eve Porcello Copyright © 2017 Alex Banks and Eve Porcello. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/insti‐ tutional sales department: 800-998-9938 or [email protected]. Editor: Allyson MacDonald Indexer: WordCo Indexing Services Production Editor: Melanie Yarbrough Interior Designer: David Futato Copyeditor: Colleen Toporek Cover Designer: Karen Montgomery Proofreader: Rachel Head Illustrator: Rebecca Demarest May 2017: First Edition Revision History for the First Edition 2017-04-26: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781491954621 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Learning React, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
    [Show full text]
  • React.Pdf Email: [email protected] Twitter: @Mark Volkmann Github: Mvolkmann Website
    Say “No” to Complexity! Mark Volkmann, Object Computing, Inc. http://ociweb.com/mark/MidwestJS/react.pdf Email: [email protected] Twitter: @mark_volkmann https://github.com/mvolkmann/react-examples GitHub: mvolkmann Website: http://ociweb.com/mark Copyright © 2015-2016 by Object Computing, Inc. (OCI) All rights reserved Intro. Meaning behind the talk title - 2 kinds of complexity other frameworks state management approaches: thunks, sagas, epics, effects, GraphQL, Relay, Falcor, ... Why are the slides so dense? Copyright © 2015-2016 by Object Computing, Inc. (OCI) React All rights reserved 2 What is OCI? Software development (on-site and off-site), consulting, and training Home of Grails, “An Open Source high-productivity framework for building fast and scalable web applications” Open Source Transformation Services helping clients move from commercial to open source software Industrial Internet of Things (IIoT) DevOps Copyright © 2015-2016 by Object Computing, Inc. (OCI) React All rights reserved 3 Overview ... Web app library from Facebook As of 8/6/16, React was reportedly used by Airbnb, Angie’s List, http://facebook.github.io/react/ Atlasssian, BBC, Capitol One, Clash of Focuses on view portion Clans, Codecademy, Coursera, Docker, Dropbox, Expedia, Facebook, Feedly, not full stack like other frameworks such as AngularJS and EmberJS Flipboard, HipChat, IMDb, Instagram, Intuit, Khan Academy, Lyft, New York use other libraries for non-view functionality Times, NFL, NHL, Netflix, Paypal, some are listed later Periscope, Reddit, Salesforce, Squarespace, Tesla Motors, Twitter, “One-way reactive data flow” Uber, Visa, WhatsApp, Wired, Wolfrum UI reacts to “state” changes Alpha, Wordpress, Yahoo, Zendesk, and many more. not two-way data binding like in AngularJS 1 Source: https://github.com/facebook/ what triggered a digest cycle? react/wiki/Sites-Using-React should I manually trigger it? easier to follow flow of data events -> state changes -> component rendering Copyright © 2015-2016 by Object Computing, Inc.
    [Show full text]
  • Npm Packages As Ingredients: a Recipe-Based Approach
    npm Packages as Ingredients: a Recipe-based Approach Kyriakos C. Chatzidimitriou, Michail D. Papamichail, Themistoklis Diamantopoulos, Napoleon-Christos Oikonomou, and Andreas L. Symeonidis Electrical and Computer Engineering Dept., Aristotle University of Thessaloniki, Thessaloniki, Greece fkyrcha, mpapamic, thdiaman, [email protected], [email protected] Keywords: Dependency Networks, Software Reuse, JavaScript, npm, node. Abstract: The sharing and growth of open source software packages in the npm JavaScript (JS) ecosystem has been exponential, not only in numbers but also in terms of interconnectivity, to the extend that often the size of de- pendencies has become more than the size of the written code. This reuse-oriented paradigm, often attributed to the lack of a standard library in node and/or in the micropackaging culture of the ecosystem, yields interest- ing insights on the way developers build their packages. In this work we view the dependency network of the npm ecosystem from a “culinary” perspective. We assume that dependencies are the ingredients in a recipe, which corresponds to the produced software package. We employ network analysis and information retrieval techniques in order to capture the dependencies that tend to co-occur in the development of npm packages and identify the communities that have been evolved as the main drivers for npm’s exponential growth. 1 INTRODUCTION Given that dependencies and reusability have be- come very important in today’s software develop- The popularity of JS is constantly increasing, and ment process, npm registry has become a “must” along is increasing the popularity of frameworks for place for developers to share packages, defining code building server (e.g.
    [Show full text]
  • Means Nested Providers from the Real Client. for Example P->[email protected] Means That P2 Is the P’S Provider and P Is the Real Client’S Provider
    real client = the client package that we executed the release’s test. -> means nested providers from the real client. For example p->[email protected] means that p2 is the p’s provider and p is the real client’s provider. --------------------------------------------------------------------- 1) [email protected] changed a key in its code, that did not introduce an error, but it became incompatible with babel-eslint. The escope is not a babel-eslint’s provider. This error was fixed by [email protected], when its providers claimed that it should be fixed in babel-eslint. ● Issue in babel-eslint ● Issue in escope ● Pull-request in babel-eslint ● Fixed by provider babel-eslint, which is the provider of the real client. ● Category: incompatible providers version. 2) the real client has grunt-jslint->jslint@>=0.3.4 as its providers. The [email protected] started to use ES6 and moved all of ES5’s code to another file. The [email protected] did a downgrade in the jslint’s version. Specifically, the grunt-jslint uses the array JSLINT.error, which was moved to another file. jslint is a provider of grunt-jslint, and grunt-jslint is a provider of real client. ● Downgrade of jslint ● [email protected] diff ● [email protected] changelog ● Fixed by provider as client grunt-jslint, which is the client of jslint. ● Category: Feature change. 3) the real client has the [email protected] as its provider. The babel-preset-es2015-rollup has the babel-preset-es2015 as its provider, that is introducing an error.
    [Show full text]
  • Investigating the Reproducbility of NPM Packages
    Investigating the Reproducbility of NPM packages Pronnoy Goswami Thesis submitted to the Faculty of the Virginia Polytechnic Institute and State University in partial fulfillment of the requirements for the degree of Master of Science in Computer Engineering Haibo Zeng, Chair Na Meng Paul E. Plassmann May 6, 2020 Blacksburg, Virginia Keywords: Empirical, JavaScript, NPM packages, Reproducibility, Software Security, Software Engineering Copyright 2020, Pronnoy Goswami Investigating the Reproducbility of NPM packages Pronnoy Goswami (ABSTRACT) The meteoric increase in the popularity of JavaScript and a large developer community has led to the emergence of a large ecosystem of third-party packages available via the Node Package Manager (NPM) repository which contains over one million published packages and witnesses a billion daily downloads. Most of the developers download these pre-compiled published packages from the NPM repository instead of building these packages from the available source code. Unfortunately, recent articles have revealed repackaging attacks to the NPM packages. To achieve such attacks the attackers primarily follow three steps – (1) download the source code of a highly depended upon NPM package, (2) inject mali- cious code, and (3) then publish the modified packages as either misnamed package (i.e., typo-squatting attack) or as the official package on the NPM repository using compromised maintainer credentials. These attacks highlight the need to verify the reproducibility of NPM packages. Reproducible Build is a concept that allows the verification of build artifacts for pre-compiled packages by re-building the packages using the same build environment config- uration documented by the package maintainers. This motivates us to conduct an empirical study (1) to examine the reproducibility of NPM packages, (2) to assess the influence of any non-reproducible packages, and (3) to explore the reasons for non-reproducibility.
    [Show full text]
  • Building-Frontend-Pipeline Short
    Building a Frontend Pipeline Nathaniel T. Schutta @ntschutta Ah JavaScript! It used to be so simple right? 1,500 line main.js. Our apps aren’t like that anymore though are they? JavaScript is a first class citizen now. Modern applications are many thousands of lines of JavaScript. We incorporate many libraries and frameworks. https://mobile.twitter.com/joeerl/status/930774515512201216 NPM all the things. JavaScript itself is evolving. Browsers are still an issue… The struggle is real. What do we do about it? Why do we need a pipeline at all? Not your older sister’s web apps. No longer a few thousands lines of JavaScript and jQuery. Adhoc approach can’t keep up with the complexity of modern JS apps. Apply the level of discipline to the frontend that we use on the backend. Linters to ensure our code doesn’t fall prey to common errors. Unit tests to ensure our changes didn’t break anything. Bundlers to minimize asynchronous requests to our servers. Transpilers so we can leverage ES6 in older browsers. Task runers to help tie it all together. JavaScript usage has exploded. Number one language on GitHub? Yep. Not a new phenomena either. We cannot afford to treat JavaScript as a one off. The same engineering discipline we use on “server side” code must apply. Of course for many of us, JavaScript *is* our server side language too! More than a few options. Try and clear some of that up today. Linters. Certain mistakes can be caught automatically. Static code analysis. Find bad patterns. Check style adherence.
    [Show full text]
  • To Complexity!
    Say “No” to Complexity! Mark Volkmann, Object Computing, Inc. Email: [email protected] Twitter: @mark_volkmann GitHub: mvolkmann Website: http://ociweb.com/mark https://github.com/mvolkmann/react-examples Copyright © 2015-2016 by Object Computing, Inc. (OCI) All rights reserved What is OCI? New home of Grails, “An Open Source high-productivity framework for building fast and scalable web applications” Open Source Transformation Services, IIoT, DevOps offsite development, consulting, training handouts available (includes Grails sticker) Copyright © 2015-2016 by Object Computing, Inc. (OCI) React All rights reserved 2 Overview ... Web app library from Facebook As of 1/2/16, React was reportedly used by Airbnb, Atlasssian, Capitol http://facebook.github.io/react/ One, Codecademy, Coursera, Dropbox, Focuses on view portion Expedia, Facebook, Firefox, Flipboard, HipChat, IMDb, Instagram, not full stack like other frameworks such as AngularJS and EmberJS Intuit, Khan Academy, NHL, Netflix, use other libraries for non-view functionality Paypal, Reddit, Salesforce, Squarespace, Tesla Motors, New York Times, Twitter, some are listed later Uber, WhatsApp, Wired, Wordpress, “One-way reactive data flow” Yahoo, Zendesk, and many more. Source: https://github.com/facebook/ UI reacts to “state” changes react/wiki/Sites-Using-React not two-way data binding like in AngularJS 1 Facebook uses React more than what triggered a digest cycle? Google uses Angular. should I manually trigger it? easier to follow flow of data from events to state changes to component rendering Copyright © 2015-2016 by Object Computing, Inc. (OCI) React All rights reserved 3 ... Overview Can use in existing web apps that use other frameworks start at leaf nodes of UI and gradually work up, replacing existing UI with React components Defines components that are composable whole app can be one component that is built on others Components get data to render from “state” and/or “props” Can render in browser, on server, or both ex.
    [Show full text]
  • Red Hat Build of Node.Js 14 Node.Js Runtime Guide
    Red Hat build of Node.js 14 Node.js Runtime Guide Use Node.js 14 to develop scalable network applications that run on OpenShift and on stand-alone RHEL Last Updated: 2021-05-27 Red Hat build of Node.js 14 Node.js Runtime Guide Use Node.js 14 to develop scalable network applications that run on OpenShift and on stand-alone RHEL Legal Notice Copyright © 2021 Red Hat, Inc. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/ . In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
    [Show full text]
  • Packer: an Opinionated Framework for Using 'Javascript'
    Package ‘packer’ August 14, 2021 Title An Opinionated Framework for Using 'JavaScript' Date 2021-08-14 Version 0.1.1 Description Enforces good practice and provides convenience functions to make work with 'JavaScript' not just easier but also scalable. It is a robust wrapper to 'NPM', 'yarn', and 'webpack' that enables to compartmentalize 'JavaScript' code, leverage 'NPM' and 'yarn' packages, include 'TypeScript', 'React', or 'Vue' in web applications, and much more. License MIT + file LICENSE Encoding UTF-8 RoxygenNote 7.1.1 Imports fs, usethis, jsonlite, htmlwidgets, cli, assertthat, rprojroot, rstudioapi URL https://github.com/JohnCoene/packer, https://packer.john-coene.com BugReports https://github.com/JohnCoene/packer/issues Suggests testthat, covr, golem NeedsCompilation no Author John Coene [aut, cre] (<https://orcid.org/0000-0002-6637-4107>) Maintainer John Coene <[email protected]> Repository CRAN Date/Publication 2021-08-14 12:40:02 UTC R topics documented: add_plugin_clean . .3 add_plugin_eslint . .3 add_plugin_html . .4 add_plugin_prettier . .4 add_plugin_workbox . .4 apply_react . .5 1 2 R topics documented: apply_vue . .5 are_minified . .6 bundle . .6 checks . .7 engine . .7 engine_console . .8 jsdoc . .8 make_library . .9 mockup . .9 npm_console . 10 npm_fix . 10 npm_install . 10 npm_outdated . 11 npm_run . 11 npm_update . 11 put_precommit_hook . 12 put_recommended . 12 put_rprofile_adapt . 12 scaffold_ambiorix . 13 scaffold_extension . 14 scaffold_golem . 15 scaffold_input . 16 scaffold_leprechaun . 17 scaffold_output . 17
    [Show full text]
  • Complete Node.Js Secrets & Tips for Professionals
    Node.js CompleteComplete Tips & Secrets for Professionals Node.js Tips & Secrets for Professionals 200+ pages of professional hints and tricks Disclaimer This is an unocial free book created for educational purposes and is GoalKicker.com not aliated with ocial Node.js group(s) or company(s). Free Programming Books All trademarks and registered trademarks are the property of their respective owners Contents About ................................................................................................................................................................................... 1 Chapter 1: Getting started with Node.js ............................................................................................................ 2 Section 1.1: Hello World HTTP server ........................................................................................................................... 3 Section 1.2: Hello World command line ....................................................................................................................... 4 Section 1.3: Hello World with Express .......................................................................................................................... 5 Section 1.4: Installing and Running Node.js ................................................................................................................. 6 Section 1.5: Debugging Your NodeJS Application ...................................................................................................... 6 Section 1.6:
    [Show full text]
  • Webpack React Eject Rescripts
    Webpack React Eject Rescripts Rummy Gino sometimes concertina his meritocracies publicly and paste so disadvantageously! Furthermost and Linnean Ignacius demobilized while Burman Hartwell spile her illumination metonymically and sliver crossways. Zachary fine designedly. Facebook documentation on the property is here. Much like the programming language Ruby, Python was designed to be easily read by programmers. You have to add it to your tailwind config. The script will also run npm install inside the project directory, which will download any additional dependencies. Do firebase encrypt the data on transit as well as. See the License for the specific language governing permissions and limitations under the License. Now you have learned how to build an NW. Different minds, different talents. Join the conversation Cancel reply Your email address will not be published. Tailwind CSS reset and utility classes, and your custom CSS below. Snapshot testing is a feature of Jest that automatically generates text snapshots of your components and saves them on the disk so if the UI output changes, you get notified without manually writing any assertions on the component output. What about Babel or Webpack configurations? Then you can use both variations. Likewise, you can use Angular, Vue, React, or any other frontend framework for your desktop application. In the real world, we usually have to modify default webpack config for custom needs such as themes. CRA team to hide the config from whe user. See the section about running tests for more information. We should be teaching our kids how to code. Webpack dev server to proxy requests intended for our API server.
    [Show full text]
  • Javascript Quality Assurance Tools and Usage Outcomes in Github Projects
    Tool Choice Matters: JavaScript Quality Assurance Tools and Usage Outcomes in GitHub Projects David Kavaler Asher Trockman Bogdan Vasilescu Vladimir Filkov University of California, Davis University of Evansville Carnegie Mellon University University of California, Davis [email protected] [email protected] [email protected][email protected] Abstract—Quality assurance automation is essential in modern TABLE I software development. In practice, this automation is supported TOOL ADOPTION SUMMARY STATISTICS by a multitude of tools that fit different needs and require developers to make decisions about which tool to choose in a # Adoption Events given context. Data and analytics of the pros and cons can inform Across Projects these decisions. Yet, in most cases, there is a dearth of empirical Tool Task class Per tool Per task class evidence on the effectiveness of existing practices and tool choices. david 20; 763 Dependency We propose a general methodology to model the time- bithound 900 23; 917 Management dependent effect of automation tool choice on four outcomes gemnasium 3; 093 of interest: prevalence of issues, code churn, number of pull requests, and number of contributors, all with a multitude of codecov 2; 785 codeclimate Coverage 2; 328 15; 249 controls. On a large data set of npm JavaScript projects, we coveralls 11; 221 extract the adoption events for popular tools in three task classes: linters, dependency managers, and coverage reporters. ESLint 7; 095 Using mixed methods approaches, we study the reasons for the JSHint Linter 2; 876 12; 886 adoptions and compare the adoption effects within each class, and standardJS 3; 435 sequential tool adoptions across classes.
    [Show full text]