Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Simplify build #335

Merged
merged 8 commits into from
Oct 13, 2016
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ node_modules
npm-debug.log
*.iml
*.swp

\.DS_Store
85 changes: 0 additions & 85 deletions Gruntfile.js

This file was deleted.

14 changes: 0 additions & 14 deletions docs/build.sh

This file was deleted.

30 changes: 18 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@
"test": "karma start uw-frame-components/karma.conf.js --single-run",
"posttest": "cd uw-frame-components",
"build-all": "npm run build-java && npm run build-static",
"build-docs": "cd docs && ./build.sh",
"postbuild-docs": "grunt",
"prebuild-docs": "npm run build-static && rimraf docs/target && mkdir -p docs/target",
"build-docs": "cp -r uw-frame-static/target/* docs/target && cp -r docs/js docs/img docs/markdown docs/my-app docs/superstatic.json docs/target",
"build:html": "htmlprocessor uw-frame-static/index.html -o uw-frame-static/target/index.html && htmlprocessor docs/index.html -o docs/target/index.html",
"postbuild-docs": "npm run build:html",
"build-java": "cd uw-frame-java && mvn clean install",
"prebuild-static": "npm install",
"build-static": "cd uw-frame-static && ./build.sh",
"postbuild-static": "grunt",
"prebuild-static": "rimraf uw-frame-static/target && mkdir uw-frame-static/target",
"build-static": "node tools/uw-frame-static/build.js",
"postbuild-static": "npm run build:html",
"predocs": "npm run build-docs",
"docs": "cd docs/target && superstatic",
"docs:watch": "onchange uw-frame-components/** docs/** -e docs/target -v -- npm run build-docs",
"docs:dev": "npm run build-docs -s && concurrently -k \"npm run docs -s\" \"npm run docs:watch -s\"",
"jetty": "cd uw-frame-java && mvn jetty:run",
"prestatic": "npm run build-static",
"static": "cd uw-frame-static/target && superstatic --host=0.0.0.0",
"static:watch": "onchange uw-frame-components/** -i -- npm run build-static",
"static:dev": "npm run build-static -s && concurrently -k \"npm run static -s\" \"npm run static:watch -s\"",
"docker": "docker run -d --name frame -p 8009:8009 docker.doit.wisc.edu/myuw/uw-frame-superstatic:latest",
"build-docker": "docker build -t docker.doit.wisc.edu/myuw/uw-frame-superstatic .",
"stop-docker": "docker stop frame; docker rm frame;",
Expand All @@ -27,8 +33,7 @@
},
"files": [
"uw-frame-components",
"uw-frame-static",
"Gruntfile.js"
"uw-frame-static"
],
"licenses": [
{
Expand Down Expand Up @@ -68,11 +73,9 @@
},
"homepage": "https://github.com/UW-Madison-DoIT/uw-frame",
"devDependencies": {
"concurrently": "^3.1.0",
"graceful-fs": "^4.0.0",
"grunt": "^0.4.5",
"grunt-contrib-watch": "^0.6.1",
"grunt-processhtml": "^0.3.8",
"grunt-run": "^0.5.2",
"htmlprocessor": "^0.2.4",
"jasmine-core": "^2.3.4",
"karma": "0.13.21",
"karma-chrome-launcher": "0.2.2",
Expand All @@ -84,10 +87,13 @@
"karma-jasmine-html-reporter": "0.2.0",
"karma-phantomjs-launcher": "1.0.0",
"karma-requirejs": "0.2.6",
"lodash": "^4.0.0",
"less": "1.7.5",
"lodash": "^4.0.0",
"onchange": "^3.0.2",
"phantomjs-prebuilt": "2.1.7",
"recursive-copy": "^2.0.5",
"requirejs": "^2.2.0",
"rifraf": "^2.0.2",
"superstatic": "^4.0.0"
}
}
29 changes: 29 additions & 0 deletions tools/uw-frame-static/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';
var less = require('less');
var exec = require('child_process').exec;

var exec_handler = function(error, stdout, stderr) {
if (error) throw error;
}

exec('cp -r uw-frame-components/* uw-frame-static/target', exec_handler);

exec('cp uw-frame-static/superstatic.json uw-frame-static/target/', exec_handler);

exec('mkdir -p uw-frame-static/target/css/themes', exec_handler);


var themes = ['uw-madison', 'uw-system', 'uw-river-falls',
'uw-stevens-point', 'uw-milwaukee', 'uw-whitewater', 'uw-stout',
'uw-superior', 'uw-platteville', 'uw-parkside', 'uw-oshkosh',
'uw-greenbay', 'uw-lacrosse', 'uw-eau-claire', 'uw-extension',
'uw-colleges'];


for (var i = 0; i < themes.length; i++) {
var cmd = 'node_modules/.bin/lessc -x uw-frame-components/css/themes/' +
themes[i] + '.less > uw-frame-static/target/css/themes/' +
themes[i] + '.css';
exec(cmd, exec_handler);
}

31 changes: 0 additions & 31 deletions uw-frame-static/build.sh

This file was deleted.