Merge lp:~stephen-stewart/online-services-common-js/add-npmignore into lp:online-services-common-js

Proposed by Stephen Stewart
Status: Merged
Approved by: Stephen Stewart
Approved revision: 26
Merged at revision: 21
Proposed branch: lp:~stephen-stewart/online-services-common-js/add-npmignore
Merge into: lp:online-services-common-js
Diff against target: 143 lines (+44/-19)
5 files modified
.npmignore (+4/-0)
Gruntfile.js (+3/-9)
README.md (+34/-7)
build/config.js (+1/-1)
package.json (+2/-2)
To merge this branch: bzr merge lp:~stephen-stewart/online-services-common-js/add-npmignore
Reviewer Review Type Date Requested Status
Jonas G. Drange (community) Approve
Stephen Stewart Pending
Review via email: mp+209420@code.launchpad.net

Commit message

Add npmignore file, remove 'base' property from the modules obect and explain in README how a user should set this themselves.

Description of the change

Add npmignore file, update README

To post a comment you must log in.
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.npmignore'
--- .npmignore 1970-01-01 00:00:00 +0000
+++ .npmignore 2014-03-05 13:16:02 +0000
@@ -0,0 +1,4 @@
1.bzr*
2import.sh
3bower_components
4release
05
=== modified file 'Gruntfile.js'
--- Gruntfile.js 2014-03-04 11:22:55 +0000
+++ Gruntfile.js 2014-03-05 13:16:02 +0000
@@ -140,10 +140,10 @@
140 },140 },
141141
142 modules: {142 modules: {
143 u1: {143 // online services modules
144 os: {
144 src: ['./src/**/build.json'],145 src: ['./src/**/build.json'],
145 dest: './build/config.js',146 dest: './build/config.js'
146 base: '/convoy'
147 }147 }
148 },148 },
149149
@@ -290,14 +290,9 @@
290 config = {},290 config = {},
291 out = '',291 out = '',
292 group = this.target,292 group = this.target,
293 base = this.data.base,
294 template = this.data.tmpl ||293 template = this.data.tmpl ||
295 'YUI.GlobalConfig = <%= config %>;';294 'YUI.GlobalConfig = <%= config %>;';
296295
297 if (!base) {
298 throw new Error('need base path for YUI config');
299 }
300
301 this.filesSrc.forEach(function(filepath) {296 this.filesSrc.forEach(function(filepath) {
302 var meta = grunt.file.readJSON(filepath),297 var meta = grunt.file.readJSON(filepath),
303 key;298 key;
@@ -327,7 +322,6 @@
327322
328 config.groups = {};323 config.groups = {};
329 config.groups[group] = {};324 config.groups[group] = {};
330 config.groups[group].base = base;
331 config.groups[group].modules = modules;325 config.groups[group].modules = modules;
332326
333 out = grunt.template.process(template, {data: {config: JSON.stringify(config) }});327 out = grunt.template.process(template, {data: {config: JSON.stringify(config) }});
334328
=== modified file 'README.md'
--- README.md 2014-03-04 11:22:55 +0000
+++ README.md 2014-03-05 13:16:02 +0000
@@ -1,9 +1,32 @@
11
2Ubuntu Common YUI Module Library2Ubuntu Common YUI Module Library
3==========================================3================================
44
55Simple Usage
6Install nodejs6------------
7
8'''
9npm install online-services-common-js
10'''
11
12Link YUI and the Online Services YUI module config in your HTML document:
13'''
14<script src="node_modules/online-services-common-js/build/config.js"></script>
15<!--
16set up config to let YUI know where to find your modules, combo loader, etc.
17http://yuilibrary.com/yui/docs/yui/
18-->
19<script>
20// the group name is 'os'
21YUI.GlobalConfig.groups.os.combine = false;
22YUI.GlobalConfig.groups.os.base = 'node_modules/build/';
23</script>
24'''
25
26Hacking
27-------
28
29Install nodejs:
730
8'''31'''
9sudo apt-get update32sudo apt-get update
@@ -13,16 +36,20 @@
13sudo apt-get install nodejs36sudo apt-get install nodejs
14'''37'''
1538
16Install global npm deps39Install dev dependencies, either from within module in node\_modules or within a
40online-services-common-js branch:
41
17'''42'''
18npm install -g grunt-cli bower grover shifter yeti
19npm install43npm install
44bower install
20'''45'''
2146
47(Bower is used to install YUI for testing purposes)
48
2249
23Available Grunt tasks50Available Grunt tasks
24'''51'''
25grunt build52grunt build
26grunt test53grunt test
27grunt watch54grunt run # 'watch'
28'''55'''
2956
=== modified file 'build/config.js'
--- build/config.js 2014-03-04 12:15:23 +0000
+++ build/config.js 2014-03-05 13:16:02 +0000
@@ -1,1 +1,1 @@
1YUI.GlobalConfig = {"groups":{"u1":{"base":"/convoy","modules":{"global-navigation-templates":{"requires":["template"]},"global-navigation":{"requires":["node","template","array-extras","global-navigation-templates"],"skinnable":true},"password-meter":{"requires":["base","widget","event-key","transition"],"skinnable":true},"plugin-jit-bar":{"requires":["anim","node","node-scroll-info","plugin"],"skinnable":true},"plugin-panel-anim":{"requires":["plugin","base-build","event-custom","transition"]},"rangyinputs":{},"uploader":{"requires":["array-extras","uploader-html5"]},"uploader-follow":{"requires":["base","anim"]},"util-share":{"requires":["base","node"]},"util-stacktrace":{"requires":[]},"util-oops":{"requires":["base","io-base","json-stringify"]},"util":{"use":["util-share","util-stacktrace","util-oops"]},"widget-cc-input":{"requires":["node-pluginhost","widget","base","transition","button","rangyinputs","template"],"skinnable":true},"position-sticky":{"requires":["widget","substitute","node","event-resize"]},"widget-tooltip":{"requires":["event-mouseenter","widget","widget-position","widget-position-align","widget-stack","escape"],"skinnable":true}}}}};
2\ No newline at end of file1\ No newline at end of file
2YUI.GlobalConfig = {"groups":{"os":{"modules":{"global-navigation-templates":{"requires":["template"]},"global-navigation":{"requires":["node","template","array-extras","global-navigation-templates"],"skinnable":true},"password-meter":{"requires":["base","widget","event-key","transition"],"skinnable":true},"plugin-jit-bar":{"requires":["anim","node","node-scroll-info","plugin"],"skinnable":true},"plugin-panel-anim":{"requires":["plugin","base-build","event-custom","transition"]},"rangyinputs":{},"uploader":{"requires":["array-extras","uploader-html5"]},"uploader-follow":{"requires":["base","anim"]},"util-share":{"requires":["base","node"]},"util-stacktrace":{"requires":[]},"util-oops":{"requires":["base","io-base","json-stringify"]},"util":{"use":["util-share","util-stacktrace","util-oops"]},"widget-cc-input":{"requires":["node-pluginhost","widget","base","transition","button","rangyinputs","template"],"skinnable":true},"position-sticky":{"requires":["widget","substitute","node","event-resize"]},"widget-tooltip":{"requires":["event-mouseenter","widget","widget-position","widget-position-align","widget-stack","escape"],"skinnable":true}}}}};
3\ No newline at end of file3\ No newline at end of file
44
=== modified file 'package.json'
--- package.json 2014-02-23 01:21:56 +0000
+++ package.json 2014-03-05 13:16:02 +0000
@@ -1,13 +1,13 @@
1{1{
2 "name": "online-services-common-js",2 "name": "online-services-common-js",
3 "version": "0.0.3",3 "version": "0.0.4",
4 "description": "online services yui modules",4 "description": "online services yui modules",
5 "homepage": "https://launchpad.net/online-services-common-js",5 "homepage": "https://launchpad.net/online-services-common-js",
6 "bugs": "https://bugs.launchpad.net/online-services-common-js",6 "bugs": "https://bugs.launchpad.net/online-services-common-js",
7 "files": "build",7 "files": "build",
8 "scripts": {8 "scripts": {
9 "test": "echo \"Error: no test specified\" && exit 1",9 "test": "echo \"Error: no test specified\" && exit 1",
10 "postinstall": "bower install"10 "prepublish": "bower install && grunt build"
11 },11 },
12 "repository": {12 "repository": {
13 "type": "bzr",13 "type": "bzr",

Subscribers

People subscribed via source and target branches

to all changes: