UNPKG

catalyst-frontend

Version:

A configurable frontend build pipeline that caters for everything from simple SASS compilation only, right through to ES2015 plus React.

66 lines (64 loc) 2.51 kB
{ "name": "<%= name %>-frontend-build", "version": "1.0.0", "description": "Frontend build process created by catalyst-frontend", "main": "<%= options.src %>/index.js<% if (options.react) { %>x<% } %>", "scripts": { "build": "rm -rf ./<%= options.dist %> && NODE_ENV=production webpack-cli", "start": "webpack-cli serve --mode development"<% if (options.jest) { %>, "test": "./node_modules/.bin/jest", "test:watch": "./node_modules/.bin/jest --watch", "test:coverage": "./node_modules/.bin/jest --coverage"<% } %>, <% if (options.typescript) { %> "lint": "./node_modules/.bin/eslint \"<%= options.src %>/**/*.<% if (options.react) { %>{js,jsx,ts,tsx}<% } else { %>js,ts<% } %>\"", "lint:fix": "./node_modules/.bin/eslint \"<%= options.src %>/**/*.<% if (options.react) { %>{js,jsx,ts,tsx}<% } else { %>js,ts<% } %>\" --fix", "check-types": "tsc", <% } else { %> "lint": "./node_modules/.bin/eslint \"<%= options.src %>/**/*.<% if (options.react) { %>{js,jsx}<% } else { %>js<% } %>\"", "lint:fix": "./node_modules/.bin/eslint \"<%= options.src %>/**/*.<% if (options.react) { %>{js,jsx}<% } else { %>js<% } %>\" --fix", <% } %> <% if (options.storybook) { %> "storybook": "start-storybook", <% } %> "stylelint": "./node_modules/.bin/stylelint '<%= options.src %>/**/*.{scss,css}'", "stylelint:fix": "./node_modules/.bin/stylelint '<%= options.src %>/**/*.{scss,css}' --fix" }, "license": "UNLICENSED", "private": true, "browserslist": [ "last 2 versions", "edge >= 38", "safari >= 9", "ie >= 11", "chrome >= 60", "firefox >= 51" ], "engines": { "node": ">= 6.11.5" }, "dependencies": {}, "devDependencies": {}<% if (options.jest) { %>, "jest": { "verbose": true, "moduleDirectories": [ "<%= options.src %>", "node_modules" ], "moduleNameMapper": { "^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/jest-mock-files.js", "^.+\\.(scss|css)$": "<rootDir>/jest-mock-styles.js" }, "collectCoverageFrom": [ <% if (options.typescript) { %> "<%= options.src %>/**/*.{js,ts<% if (options.react) { %>,jsx,tsx<% } %>}", <% } else { %> "<%= options.src %>/**/*.{js<% if (options.react) { %>,jsx<% } %>}", <% } %> "!node_modules/**" ]<% if (options.react) { %>, "setupFilesAfterEnv": [ "./jest-setup.js" ] <% } %> }<% } %> }