cwonrails
4/9/2016 - 4:48 PM

package.npmscripts.json

{
  "name": "base-repo",
  "version": "3.0.0",
  "description": "Opinionated boilerplate for front-end projects",
  "license": "MIT",
  "author": {
    "name": "Chris Watson",
    "email": "cwonrails@gmail.com",
    "url": "https://chriswatso.io"
  },
  "private": "true",
  "repository": {
    "type": "git",
    "url": "https://github.com/cwonrails/base-repo"
  },
  "dependencies": {
    "normalize.css": "*",
    "prismjs": "*"
  },
  "engines": {
    "node": ">=4.3.2 <5 || >=5.7.1 <6",
    "npm": ">=2.15.1 < 3 || >=3.8.3 < 4"
  },
  "scripts": {
    "browsersync": "browser-sync start --no-notify --server --files 'src/*'",
    "browsersync:dist": "browser-sync start --no-notify --server --files 'dist/*'",
    "build": "npm run clean && npm run copy && npm run build:css && npm run build:html && npm run build:images && npm run build:js",
    "build:css": "npm run lint:css && npm run min:css",
    "build:html": "npm run lint:html && npm run min:html",
    "build:js": "npm run lint:js && npm run min:js",
    "build:images": "imagemin src/images/* dist/images/* -p",
    "clean": "rm -rf dist/*",
    "copy": "cp src/!{js,css,index.html} dist/",
    "deps": "david u",
    "lint": "npm run lint:css && npm run lint:html && npm run lint:js",
    "lint:css": "stylelint src/css/*.css",
    "lint:html": "html-minifier --lint src/index.html",
    "lint:js": "eslint src/js/main.js",
    "min": "npm run min:css && npm run min:html && && npm run min:js",
    "min:css": "postcss -c postcss.config.json -o dist/css/main.min.css src/css/main.css",
    "min:html": "html-minifier -c html-minifier.config.json src/index.html > dist/index.min.html",
    "min:js": "uglify src/js/main.js > dist/js/main.min.js",
    "test": "ava",
    "watch": "npm run browsersync && npm-watch"
  },
  "watch": {
    "build": {
      "patterns": ["src", "test"],
      "extensions": "css,html,js,png,svg"
    }
  },
  "devDependencies": {
    "ava": "*",
    "autoprefixer": "*",
    "babel-eslint": "*",
    "babel-preset-es2015": "*",
    "babel-preset-stage-0": "*",
    "browser-sync": "*",
    "david": "*",
    "eslint": "*",
    "eslint-plugin-ava": "*",
    "imagemin": "*",
    "uglify-js": "*",
    "html-minifier": "*",
    "npm-watch": "*",
    "parallelshell": "*",
    "postcss-cli": "*",
    "postcss-csso": "*",
    "postcss-flexibility": "*",
    "posthtml-cli": "*",
    "stylefmt": "*",
    "stylelint": "*",
    "stylelint-config-standard": "*",
    "uglify-js": "*"
  },
  "babel": {
    "presets": [
      "es2015",
      "stage-0"
    ]
  },
  "eslintConfig": {
    "extends": [
      "eslint:recommended",
      "plugin:ava/recommended"
    ],
    "parser": "babel-eslint",
    "plugins": [
      "eslint-plugin-ava"
    ]
  },
  "stylelint": {
    "extends": "stylelint-config-standard"
  }
}