mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 20:51:20 +02:00
add prod and dev examples
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
*.sketch
|
*.sketch
|
||||||
build.js
|
|
||||||
build.js.map
|
|
||||||
dist
|
dist
|
||||||
|
examples/build.dev.js
|
||||||
|
examples/build.prod.js
|
||||||
node_modules
|
node_modules
|
||||||
tmp
|
tmp
|
||||||
|
13
examples/dev.html
Normal file
13
examples/dev.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Slate</title>
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i&subset=latin-ext" >
|
||||||
|
<link rel="stylesheet" href="index.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main></main>
|
||||||
|
<script src="build.dev.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -8,6 +8,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main></main>
|
<main></main>
|
||||||
<script src="build.js"></script>
|
<script src="build.prod.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
12
package.json
12
package.json
@@ -74,12 +74,16 @@
|
|||||||
"dist:bundle:min": "NODE_ENV=production browserify ./dist/index.js --transform envify --transform uglifyify --transform browserify-shim --standalone Slate | uglifyjs --output ./dist/slate.min.js",
|
"dist:bundle:min": "NODE_ENV=production browserify ./dist/index.js --transform envify --transform uglifyify --transform browserify-shim --standalone Slate | uglifyjs --output ./dist/slate.min.js",
|
||||||
"dist:npm": "babel --out-dir ./dist ./lib",
|
"dist:npm": "babel --out-dir ./dist ./lib",
|
||||||
"dist:watch": "babel --watch --out-dir ./dist ./lib",
|
"dist:watch": "babel --watch --out-dir ./dist ./lib",
|
||||||
"examples": "browserify --debug --transform babelify ./examples/index.js --outfile ./examples/build.js",
|
"examples": "npm run examples:dev && npm run examples:prod",
|
||||||
"examples:watch": "watchify --debug --transform babelify ./examples/index.js --outfile ./examples/build.js",
|
"examples:dev": "browserify --debug --transform babelify ./examples/index.js --outfile ./examples/build.dev.js",
|
||||||
"gh-pages": "gh-pages --dist ./examples",
|
"examples:open": "open http://localhost:8080/dev.html",
|
||||||
|
"examples:prod": "NODE_ENV=production browserify --transform babelify ./examples/index.js --outfile ./examples/build.prod.js",
|
||||||
|
"examples:start": "http-server ./examples",
|
||||||
|
"examples:watch": "watchify --debug --transform babelify ./examples/index.js --outfile ./examples/build.dev.js",
|
||||||
|
"gh-pages": "npm run dist && npm run examples && gh-pages --dist ./examples",
|
||||||
"lint": "eslint --ignore-pattern 'build.js' '{examples,lib}/**/*.js'",
|
"lint": "eslint --ignore-pattern 'build.js' '{examples,lib}/**/*.js'",
|
||||||
"prepublish": "npm run dist",
|
"prepublish": "npm run dist",
|
||||||
"start": "http-server ./examples",
|
"start": "npm run examples:start",
|
||||||
"test": "npm run dist && npm run lint && npm run test:server",
|
"test": "npm run dist && npm run lint && npm run test:server",
|
||||||
"test:server": "mocha --compilers js:babel-core/register --reporter spec ./test/server.js"
|
"test:server": "mocha --compilers js:babel-core/register --reporter spec ./test/server.js"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user