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
1=== added file '.npmignore'
2--- .npmignore 1970-01-01 00:00:00 +0000
3+++ .npmignore 2014-03-05 13:16:02 +0000
4@@ -0,0 +1,4 @@
5+.bzr*
6+import.sh
7+bower_components
8+release
9
10=== modified file 'Gruntfile.js'
11--- Gruntfile.js 2014-03-04 11:22:55 +0000
12+++ Gruntfile.js 2014-03-05 13:16:02 +0000
13@@ -140,10 +140,10 @@
14 },
15
16 modules: {
17- u1: {
18+ // online services modules
19+ os: {
20 src: ['./src/**/build.json'],
21- dest: './build/config.js',
22- base: '/convoy'
23+ dest: './build/config.js'
24 }
25 },
26
27@@ -290,14 +290,9 @@
28 config = {},
29 out = '',
30 group = this.target,
31- base = this.data.base,
32 template = this.data.tmpl ||
33 'YUI.GlobalConfig = <%= config %>;';
34
35- if (!base) {
36- throw new Error('need base path for YUI config');
37- }
38-
39 this.filesSrc.forEach(function(filepath) {
40 var meta = grunt.file.readJSON(filepath),
41 key;
42@@ -327,7 +322,6 @@
43
44 config.groups = {};
45 config.groups[group] = {};
46- config.groups[group].base = base;
47 config.groups[group].modules = modules;
48
49 out = grunt.template.process(template, {data: {config: JSON.stringify(config) }});
50
51=== modified file 'README.md'
52--- README.md 2014-03-04 11:22:55 +0000
53+++ README.md 2014-03-05 13:16:02 +0000
54@@ -1,9 +1,32 @@
55
56 Ubuntu Common YUI Module Library
57-==========================================
58-
59-
60-Install nodejs
61+================================
62+
63+Simple Usage
64+------------
65+
66+'''
67+npm install online-services-common-js
68+'''
69+
70+Link YUI and the Online Services YUI module config in your HTML document:
71+'''
72+<script src="node_modules/online-services-common-js/build/config.js"></script>
73+<!--
74+set up config to let YUI know where to find your modules, combo loader, etc.
75+http://yuilibrary.com/yui/docs/yui/
76+-->
77+<script>
78+// the group name is 'os'
79+YUI.GlobalConfig.groups.os.combine = false;
80+YUI.GlobalConfig.groups.os.base = 'node_modules/build/';
81+</script>
82+'''
83+
84+Hacking
85+-------
86+
87+Install nodejs:
88
89 '''
90 sudo apt-get update
91@@ -13,16 +36,20 @@
92 sudo apt-get install nodejs
93 '''
94
95-Install global npm deps
96+Install dev dependencies, either from within module in node\_modules or within a
97+online-services-common-js branch:
98+
99 '''
100-npm install -g grunt-cli bower grover shifter yeti
101 npm install
102+bower install
103 '''
104
105+(Bower is used to install YUI for testing purposes)
106+
107
108 Available Grunt tasks
109 '''
110 grunt build
111 grunt test
112-grunt watch
113+grunt run # 'watch'
114 '''
115
116=== modified file 'build/config.js'
117--- build/config.js 2014-03-04 12:15:23 +0000
118+++ build/config.js 2014-03-05 13:16:02 +0000
119@@ -1,1 +1,1 @@
120-YUI.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}}}}};
121\ No newline at end of file
122+YUI.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}}}}};
123\ No newline at end of file
124
125=== modified file 'package.json'
126--- package.json 2014-02-23 01:21:56 +0000
127+++ package.json 2014-03-05 13:16:02 +0000
128@@ -1,13 +1,13 @@
129 {
130 "name": "online-services-common-js",
131- "version": "0.0.3",
132+ "version": "0.0.4",
133 "description": "online services yui modules",
134 "homepage": "https://launchpad.net/online-services-common-js",
135 "bugs": "https://bugs.launchpad.net/online-services-common-js",
136 "files": "build",
137 "scripts": {
138 "test": "echo \"Error: no test specified\" && exit 1",
139- "postinstall": "bower install"
140+ "prepublish": "bower install && grunt build"
141 },
142 "repository": {
143 "type": "bzr",

Subscribers

People subscribed via source and target branches

to all changes: