-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
69 lines (69 loc) · 4.66 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
"name": "austin-tiy-build-tool",
"version": "1.0.0",
"description": "A basic build tool for developing and deploying basic SPAs with support for SCSS, ES6/7/JSX, and gh-pages or surge deployment",
"main": "index.js",
"scripts": {
"clean-html": "if [ -f 'dist/index.html' ]; then rm dist/index.html; fi",
"clean-assets": "if [ -d 'dist/assets' ]; then rm -r dist/assets; fi",
"clean-css": "if [ -f 'dist/main.css' ]; then rm dist/main.css; fi && if [ -f 'dist/main.css.map' ]; then rm dist/main.css.map; fi",
"clean-scripts": "if [ -f 'dist/main.js' ]; then rm dist/main.js; fi",
"build-dist": "if [ ! -d dist ]; then mkdir dist; fi",
"build-test": "if [ ! -d test ]; then mkdir test && touch test/setup.js && printf 'import {jsdom} from \"jsdom\";var exposedProperties = [\"window\", \"navigator\", \"document\"];global.document = jsdom(\"\");global.window = document.defaultView;Object.keys(document.defaultView).forEach((property) => {if (typeof global[property] === \"undefined\") { exposedProperties.push(property);global[property] = document.defaultView[property];}});global.navigator = {userAgent: \"node.js\"};' >> test/setup.js; fi && if [ ! -f test/example.js ]; then touch test/example.js; fi",
"build-html": "npm run build-dist && npm run clean-html && if [ -f 'app/index.html' ]; then cp app/index.html dist/index.html; else echo you must have an index.html file; fi",
"build-assets": "npm run build-dist && npm run clean-assets && if [ -d 'app/assets' ]; then cp -r app/assets dist; fi",
"build-css": "npm run build-dist && npm run clean-css && if [ -f 'app/scss/main.scss' ]; then sass app/scss/main.scss:dist/main.css; else echo you must have a scss directory with a main.scss in your app to compile css; fi",
"build-scripts": "npm run build-dist && npm run clean-scripts && if [ -f 'app/scripts/entry.js' ]; then browserify app/scripts/entry.js -d -v --outfile dist/main.js; else echo you must have a scripts directory with an entry.js in your app to compile js; fi",
"build": "npm run prebuild && npm run build-html && npm run build-assets && npm run build-css && npm run build-scripts",
"watch-html": "onchange 'app/index.html' -- npm run build-html",
"watch-sass": "onchange 'app/scss/**/*.scss' -- npm run build-css",
"watch-scripts": "watchify app/scripts/entry.js -d -v --outfile dist/main.js",
"watch-assets": "onchange 'app/assets/**/*.*' -- npm run build-assets",
"watch": "parallelshell 'npm run watch-html' 'npm run watch-assets' 'npm run watch-sass' 'npm run watch-scripts'",
"dev-server-start": "http-server ./dist",
"dev-server-watch": "npm run dev-server-start && onchange 'dist/**/*.*' -- npm run dev-server-start",
"start": "npm run build && parallelshell 'npm run watch' 'npm run dev-server-watch'",
"prebuild": "if [ ! -d app ]; then mkdir app; fi && if [ ! -f app/index.html ]; then printf '<!DOCTYPE html>%s\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title></title>\n\t\t<link media=\"screen\" href=\"main.css\" rel=\"stylesheet\"/>\n\t</head>\n\t<body>\n\n\t\t<script src=\"main.js\" charset=\"utf-8\"></script>\n\t</body>\n</html>' >> app/index.html; fi && if [ ! -d app/scripts ]; then mkdir app/scripts; fi && if [ ! -f app/scripts/entry.js ]; then touch app/scripts/entry.js; fi && if [ ! -d app/scss ]; then mkdir app/scss; fi && if [ ! -f app/scss/main.scss ]; then touch app/scss/main.scss; fi && if [ ! -d app/assets ]; then mkdir app/assets; fi && npm run build-test",
"deploy": "git subtree push --prefix dist origin gh-pages",
"preinstall": "if ! command -v http-server; then npm install -g http-server; fi && if ! command -v mocha; then npm install -g mocha; fi",
"postinstall": "echo '.sass-cache' >> .gitignore && echo 'dist/main.css.map' >> .gitignore && echo 'node_modules' >> .gitignore && npm start",
"test": "mocha --require test/setup.js --compilers js:babel-register --recursive"
},
"browserify": {
"transform": [
"babelify"
]
},
"babel": {
"sourceType": "module",
"presets": [
"es2015",
"react"
]
},
"author": "nicerhugs",
"license": "MIT",
"devDependencies": {
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"babel-register": "^6.11.5",
"babelify": "^7.3.0",
"browserify": "^13.0.1",
"chai": "^3.5.0",
"enzyme": "^2.4.1",
"jsdom": "^9.4.1",
"onchange": "^2.5.0",
"parallelshell": "^2.0.0",
"react-addons-test-utils": "^15.3.0",
"watchify": "^3.7.0"
},
"dependencies": {
"backbone": "^1.3.3",
"jquery": "^3.1.0",
"normalize-scss": "^5.0.3",
"react": "^15.3.0",
"react-dom": "^15.3.0",
"react-router": "^2.6.1",
"underscore": "^1.8.3"
}
}