diff --git a/.gitignore b/.gitignore index e58997fde..ac114e57d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.sketch -build.js -build.js.map dist +examples/build.dev.js +examples/build.prod.js node_modules tmp diff --git a/examples/dev.html b/examples/dev.html new file mode 100644 index 000000000..ba7fe2a4c --- /dev/null +++ b/examples/dev.html @@ -0,0 +1,13 @@ + + + + Slate + + + + + +
+ + + diff --git a/examples/index.html b/examples/index.html index 371ab6d91..62da95722 100644 --- a/examples/index.html +++ b/examples/index.html @@ -8,6 +8,6 @@
- + diff --git a/package.json b/package.json index d899219a5..504ac8faa 100644 --- a/package.json +++ b/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:npm": "babel --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:watch": "watchify --debug --transform babelify ./examples/index.js --outfile ./examples/build.js", - "gh-pages": "gh-pages --dist ./examples", + "examples": "npm run examples:dev && npm run examples:prod", + "examples:dev": "browserify --debug --transform babelify ./examples/index.js --outfile ./examples/build.dev.js", + "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'", "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:server": "mocha --compilers js:babel-core/register --reporter spec ./test/server.js" },