[#7976] add & use npm run cmds for build & watch; add license header
diff --git a/Allura/docs/development/contributing.rst b/Allura/docs/development/contributing.rst
index e161fdb..73a9974 100644
--- a/Allura/docs/development/contributing.rst
+++ b/Allura/docs/development/contributing.rst
@@ -107,7 +107,7 @@
~$ npm install -g broccoli-timepiece
~$ cd ~/src/allura
- ~$ broccoli-timepiece Allura/allura/public/nf/js/build/
+ ~$ npm run watch
Finding Something to Work On
diff --git a/Allura/docs/getting_started/installation.rst b/Allura/docs/getting_started/installation.rst
index b28fca3..026da99 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -191,7 +191,7 @@
(env-allura)~$ cd ~/src/allura
(env-allura)~$ npm install -g broccoli-cli
(env-allura)~$ npm install
- (env-allura)~$ broccoli build Allura/allura/public/nf/js/build/
+ (env-allura)~$ npm run build
The application server
diff --git a/Brocfile.js b/Brocfile.js
index e16ee4c..93cab0b 100644
--- a/Brocfile.js
+++ b/Brocfile.js
@@ -1,3 +1,21 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
var babelTranspiler = require("broccoli-babel-transpiler");
var sourceMap = require('broccoli-source-map');
var concat = require('broccoli-concat');
diff --git a/docker-compose.yml b/docker-compose.yml
index 86102ed..faac4a4 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -24,8 +24,7 @@
sh -c '
if [ ! -e Allura/allura/public/nf/js/build/transpiled.js ]; then
npm install &&
- rm -rf Allura/allura/public/nf/js/build/ &&
- broccoli build Allura/allura/public/nf/js/build/;
+ npm run build;
fi;
gunicorn --paste Allura/docker-dev.ini --reload
'
diff --git a/package.json b/package.json
index 58dcc6b..95fa5ac 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,18 @@
{
"name": "allura",
"version": "0.0.0",
- "description": "",
+ "description": "Apache Allura's JavaScript tooling",
"main": "Brocfile.js",
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "build": "rm -rf Allura/allura/public/nf/js/build/; broccoli build Allura/allura/public/nf/js/build/",
+ "watch": "broccoli-timepiece Allura/allura/public/nf/js/build/"
},
"repository": {
"type": "git",
"url": "https://git-wip-us.apache.org/repos/asf/allura.git"
},
- "author": "",
+ "author": "Apache Allura team",
"license": "Apache-2.0",
"devDependencies": {
"broccoli": "^0.16.8",
diff --git a/scripts/asf-release.sh b/scripts/asf-release.sh
index 8ee73a4..cd1e347 100755
--- a/scripts/asf-release.sh
+++ b/scripts/asf-release.sh
@@ -74,7 +74,7 @@
tar xzf $RELEASE_FILE
cd $RELEASE_FILE_EXTRACTED
npm install >/dev/null
-BROCCOLI_ENV=production broccoli build Allura/allura/public/nf/js/build/
+BROCCOLI_ENV=production npm run build
rm -rf node_modules
cd ..
tar czf $RELEASE_FILE $RELEASE_BASE