From e480085db01d366631032bc0dbe3e01eee135ca7 Mon Sep 17 00:00:00 2001 From: Michael Brade Date: Wed, 12 Oct 2016 23:04:18 +0200 Subject: [PATCH] use native table by default, it's easier to set up; added npm release script --- index.ls | 4 ++-- index.scss | 4 ++-- package.json | 7 ++++--- package.json.sh | 13 +++++++++---- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/index.ls b/index.ls index cd81ad7..9d06c8d 100644 --- a/index.ls +++ b/index.ls @@ -1,6 +1,6 @@ require! { - './table/datatables': { Table } - # './table/native': { Table } + # './table/datatables': { Table } + './table/native': { Table } 'derby-entities-lib/api': EntitiesApi 'derby-entities-lib/types': { supportedTypeComponents } } diff --git a/index.scss b/index.scss index 4c4d5ec..d351194 100644 --- a/index.scss +++ b/index.scss @@ -12,7 +12,7 @@ $fa-font-path: '/fonts/font-awesome'; @import 'compass/css3/border-radius'; -@mixin round-corners($radius, $adjust-top: 0px) { +@mixin round-corners($radius, $adjust-top: 0) { &:first-child { @include border-radius(($radius + $adjust-top) 0 0 $radius); } @@ -24,7 +24,7 @@ $fa-font-path: '/fonts/font-awesome'; // datatables -//@import './table/datatables'; +// @import './table/datatables'; // native @import './table/native'; diff --git a/package.json b/package.json index 90f3376..9253e82 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "derby-entity", "description": "A Perfect DerbyJS CRUD Component", - "version": "1.2.0", + "version": "1.2.1", "author": { "name": "Michael Brade", "email": "brade@kde.org" @@ -33,11 +33,12 @@ "html-minifier": "3.x" }, "scripts": { - "prebuild": "npm run clean; touch .create_stash && git stash save --include-untracked \"npm build stash\";", + "prebuild": "npm run clean;touch .create_stash && git stash save --include-untracked \"npm build stash\";npm test || { npm run postbuild; exit 1; };", "build": "export DEST=dist;export SOURCES='*.ls';export VIEWS='*.html';export ASSETS='.*.scss|./README.md|./package.json';export IGNORE=\"./$DEST|./test|./node_modules\";echo \"\u001b[01;32mCompiling and minifying...\u001b[00m\";find -regextype posix-egrep -regex $IGNORE -prune -o -name \"$SOURCES\" -print0| xargs -n1 -P8 -0 sh -c 'echo $0...;mkdir -p \"$DEST/`dirname $0`\";lsc -cp \"$0\" | uglifyjs - -cm -o \"$DEST/${0%.*}.js\"';echo \"\u001b[01;32mMinifying views...\u001b[00m\";find -regextype posix-egrep -regex $IGNORE -prune -o -name \"$VIEWS\" -print0| xargs -n1 -P8 -0 sh -c 'echo \"$0 -> $DEST/$0\";mkdir -p \"$DEST/`dirname $0`\";html-minifier --config-file .html-minifierrc -o \"$DEST/$0\" \"$0\"'| column -t -c 3;echo \"\u001b[01;32mCopying assets...\u001b[00m\";find -regextype posix-egrep -regex $IGNORE -prune -o -regex $ASSETS -print0| xargs -n1 -0 sh -c 'echo \"$0 -> $DEST/$0\";mkdir -p \"$DEST/`dirname \"$0\"`\";cp -a \"$0\" \"$DEST/$0\"'| column -t -c 3;echo \"\u001b[01;32mDone!\u001b[00m\";", "postbuild": "git stash pop --index && rm .create_stash;", "clean": "rm -rf dist;", - "test": "echo \"TODO: no tests specified yet\" && exit 1;" + "test": "echo \"TODO: no tests specified yet\";", + "release": "npm run build; cd dist; npm publish;" }, "engines": { "node": ">= 4.x" diff --git a/package.json.sh b/package.json.sh index 3463ab2..915e7a3 100755 --- a/package.json.sh +++ b/package.json.sh @@ -2,7 +2,7 @@ name: 'derby-entity' description: 'A Perfect DerbyJS CRUD Component' -version: '1.2.0' +version: '1.2.1' author: name: 'Michael Brade' @@ -45,7 +45,11 @@ scripts: # make sure a stash will be created and stash everything not committed # beware: --all would be really correct, but it also removes node_modules, so use --include-untracked instead - prebuild: 'npm run clean; touch .create_stash && git stash save --include-untracked "npm build stash";' + prebuild: ' + npm run clean; + touch .create_stash && git stash save --include-untracked "npm build stash"; + npm test || { npm run postbuild; exit 1; }; + ' # build the distribution under dist: create directory structure, compile to JavaScript, uglify # TODO: compile scss to dist/css @@ -88,9 +92,10 @@ scripts: ## testing - test: "echo \"TODO: no tests specified yet\" && exit 1;" + test: 'echo "TODO: no tests specified yet";' - ## publishing: run "npm run build; cd dist; npm publish" + ## publishing + release: "npm run build; cd dist; npm publish;" engines: node: '>= 4.x'