Skip to content

This ruby script will create all the necessary initial files and folders & also installs all the relevant plugins, scripts, and dependencies necessary.

Notifications You must be signed in to change notification settings

ryee-dev/npm-webpacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 

Repository files navigation

npm-webpacker

This script creates all necessary initial files and folders & installs all relevant plugins, scripts, and dependencies necessary.

(so far)

Instructions

1. Clone

$ cd desktop
$ git clone https://github.com/ryee926/npm-webpacker

2. Run Script

$ cd npm-webpacker
$ ruby launch.rb

3. IMPORTANT | Update package.json | IMPORTANT

$ cd (your project folder)
$ atom .

(ctrl-f) || (⌘-f)

"main": "webpack.config.js",
"scripts": {
  "test": "echo \"Error: no test specified\" && exit 1"
},

replace with

"main": "index.js",
"scripts": {
  "build": "webpack --mode development",
  "start": "webpack --mode development; webpack-dev-server --open --mode development",
  "lint": "eslint --fix src/*.js",
  "test": "karma start karma.conf.js --mode development"
},

4. Prep for Run

$ npm install

5. Run

$ npm run build

or

$ npm run start

Included dependencies

  • creates package.json
  • dependency: installs most recent version of npm
  • dependency: webpack development dependency
  • dependency: allow webpack use from command line (CLI - command line interface)
  • dependency: allows images to be retrieved from the 'src/img' folder
  • dependency: jquery
  • dependency: popper
  • dependency: bootstrap
  • dependency: styles.css
  • dependency (plugin): webpack plugin
  • dependency (plugin): webpack declutterer
  • dependency (plugin): uglify
  • dependency (plugin): webpack development server
  • dependency (linter): eslint
  • dependenct (linter): eslint loader
  • Jasmine
  • jasmine node module
  • jasmine helper package
  • initialize jasmine
  • Karma
  • karma test-runner
  • integrate jasmine and karma
  • specify chrome browser
  • karma cli
  • karma webpack integration
  • karma jquery integration
  • karma testing reporter
  • initialize karma
  • Babel
  • babel loader

Changelog

v.1.1.1

  • Adds Dotenv plugin
  • Updates .gitignore

v.1.1.0

  • Working version
  • (to be added)

v.1.0.6

  • Adds a spec template within the spec folder created through
$ karma init

v.1.0.5

  • ELI5-level README

v.1.0.4

  • adds plugin to enable access to 'src/img' folder (credit to: @GreenBeetle, great find :D)
  • some refactoring

v. 1.0.1

  • fixes webpack.config.js syntax errors (credit to: @logmannn, thanks!)
  • still unable to update script portion of .json

v. 1.0.0

  • currently unable to update the script portion of package.json
  • does not fully update the webpack.config.js file
  • these must be manually updated.

Contact

If you have any questions or anything lmk.

ryee926@gmail.com or msg on slack

About

This ruby script will create all the necessary initial files and folders & also installs all the relevant plugins, scripts, and dependencies necessary.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages