Skip to content

Commit 456183e

Browse files
author
Brian Muenzenmeyer
authored
Merge pull request #370 from pattern-lab/dev
PL/Node 2.0.0
2 parents d019a8d + 2d1070b commit 456183e

File tree

211 files changed

+3589
-20398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+3589
-20398
lines changed

.eslintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"eqeqeq": [2, "allow-null"],
1515
"global-strict": [0, "never"],
1616
"guard-for-in": 2,
17-
"indent": [2, 2, {"SwitchCase": 1, "VariableDeclarator": 1}],
18-
"lines-around-comment": [2, {
17+
"indent": [1, 2, {"SwitchCase": 1, "VariableDeclarator": 1}],
18+
"lines-around-comment": [1, {
1919
"beforeBlockComment": true,
2020
"beforeLineComment": true,
2121
"allowBlockStart": true,

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules/
2-
npm-debug.log
32
.DS_Store
43
latest-change.txt
54
patternlab.json

.travis.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
language: node_js
22

33
node_js:
4-
- stable
5-
- 4.0
6-
- 0.12
7-
- 0.11
4+
- node
5+
- 6
6+
- 5
7+
- 4
88

99
before_install:
1010
- phantomjs --version
@@ -16,3 +16,12 @@ branches:
1616
only:
1717
- master
1818
- dev
19+
- dev-2.0-core
20+
21+
notifications:
22+
webhooks:
23+
urls:
24+
- https://webhooks.gitter.im/e/a14f537f16b0756d9470
25+
on_success: always
26+
on_failure: always
27+
on_start: never

Gruntfile.js

Lines changed: 10 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,41 @@
11
module.exports = function (grunt) {
22

3-
var path = require('path');
4-
5-
function paths() {
6-
return require('./patternlab-config.json').paths;
7-
}
8-
9-
// Project configuration.
3+
/******************************
4+
* Project configuration.
5+
* Should only be needed if you are developing against core, running tests, linting and want to run tests or increment package numbers
6+
*****************************/
107
grunt.initConfig({
118
pkg: grunt.file.readJSON('package.json'),
129
concat: {
1310
options: {
1411
stripBanners: true,
15-
banner: '/* \n * <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy") %> \n * \n * <%= pkg.author %>, and the web community.\n * Licensed under the <%= pkg.license %> license. \n * \n * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. \n *\n */\n\n',
12+
banner: '/* \n * <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy") %> \n * \n * <%= pkg.author.name %>, <%= pkg.contributors[0].name %>, and the web community.\n * Licensed under the <%= pkg.license %> license. \n * \n * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. \n *\n */\n\n',
1613
},
1714
patternlab: {
1815
src: './core/lib/patternlab.js',
1916
dest: './core/lib/patternlab.js'
20-
},
21-
object_factory: {
22-
src: './core/lib/object_factory.js',
23-
dest: './core/lib/object_factory.js'
24-
},
25-
lineage: {
26-
src: './core/lib/lineage_hunter.js',
27-
dest: './core/lib/lineage_hunter.js'
28-
},
29-
media_hunter: {
30-
src: './core/lib/media_hunter.js',
31-
dest: './core/lib/media_hunter.js'
32-
},
33-
patternlab_grunt: {
34-
src: './core/lib/patternlab_grunt.js',
35-
dest: './core/lib/patternlab_grunt.js'
36-
},
37-
patternlab_gulp: {
38-
src: './core/lib/patternlab_gulp.js',
39-
dest: './core/lib/patternlab_gulp.js'
40-
},
41-
parameter_hunter: {
42-
src: './core/lib/parameter_hunter.js',
43-
dest: './core/lib/parameter_hunter.js'
44-
},
45-
pattern_exporter: {
46-
src: './core/lib/pattern_exporter.js',
47-
dest: './core/lib/pattern_exporter.js'
48-
},
49-
pattern_assembler: {
50-
src: './core/lib/pattern_assembler.js',
51-
dest: './core/lib/pattern_assembler.js'
52-
},
53-
pseudopattern_hunter: {
54-
src: './core/lib/pseudopattern_hunter.js',
55-
dest: './core/lib/pseudopattern_hunter.js'
56-
},
57-
list_item_hunter: {
58-
src: './core/lib/list_item_hunter.js',
59-
dest: './core/lib/list_item_hunter.js'
60-
},
61-
style_modifier_hunter: {
62-
src: './core/lib/style_modifier_hunter.js',
63-
dest: './core/lib/style_modifier_hunter.js'
64-
}
65-
},
66-
copy: {
67-
main: {
68-
files: [
69-
{ expand: true, cwd: path.resolve(paths().source.js), src: '*.js', dest: path.resolve(paths().public.js) },
70-
{ expand: true, cwd: path.resolve(paths().source.css), src: '*.css', dest: path.resolve(paths().public.css) },
71-
{ expand: true, cwd: path.resolve(paths().source.images), src: ['**/*.png', '**/*.jpg', '**/*.gif', '**/*.jpeg'], dest: path.resolve(paths().public.images) },
72-
{ expand: true, cwd: path.resolve(paths().source.fonts), src: '*', dest: path.resolve(paths().public.fonts) },
73-
{ expand: true, cwd: path.resolve(paths().source.data), src: 'annotations.js', dest: path.resolve(paths().public.data) }
74-
]
75-
},
76-
styleguide: {
77-
files: [
78-
{ expand: true, cwd: path.resolve(paths().source.styleguide), src: ['*.*', '**/*.*'], dest: path.resolve(paths().public.styleguide) }
79-
]
80-
}
81-
},
82-
watch: {
83-
all: {
84-
files: [
85-
path.resolve(paths().source.css + '**/*.css'),
86-
path.resolve(paths().source.styleguide + 'css/*.css'),
87-
path.resolve(paths().source.patterns + '**/*.mustache'),
88-
path.resolve(paths().source.patterns + '**/*.json'),
89-
path.resolve(paths().source.fonts + '/*'),
90-
path.resolve(paths().source.images + '/*'),
91-
path.resolve(paths().source.data + '*.json'),
92-
path.resolve(paths().source.js + '/*.js')
93-
],
94-
tasks: ['default', 'bsReload:css']
9517
}
9618
},
9719
nodeunit: {
9820
all: ['test/*_tests.js']
9921
},
100-
browserSync: {
101-
dev: {
102-
options: {
103-
server: path.resolve(paths().public.root),
104-
watchTask: true,
105-
watchOptions: {
106-
ignoreInitial: true,
107-
ignored: '*.html'
108-
},
109-
snippetOptions: {
110-
// Ignore all HTML files within the templates folder
111-
blacklist: ['/index.html', '/', '/?*']
112-
},
113-
plugins: [
114-
{
115-
module: 'bs-html-injector',
116-
options: {
117-
files: [path.resolve(paths().public.root + '/index.html'), path.resolve(paths().public.styleguide + '/styleguide.html')]
118-
}
119-
}
120-
],
121-
notify: {
122-
styles: [
123-
'display: none',
124-
'padding: 15px',
125-
'font-family: sans-serif',
126-
'position: fixed',
127-
'font-size: 1em',
128-
'z-index: 9999',
129-
'bottom: 0px',
130-
'right: 0px',
131-
'border-top-left-radius: 5px',
132-
'background-color: #1B2032',
133-
'opacity: 0.4',
134-
'margin: 0',
135-
'color: white',
136-
'text-align: center'
137-
]
138-
}
139-
}
140-
}
141-
},
14222
eslint: {
14323
options: {
14424
configFile: './.eslintrc'
14525
},
14626
target: ['./core/lib/*']
147-
},
148-
bsReload: {
149-
css: path.resolve(paths().public.root + '**/*.css')
15027
}
15128
});
15229

15330
// load all grunt tasks
154-
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
155-
156-
//load the patternlab task
157-
grunt.task.loadTasks('./core/lib/');
158-
159-
grunt.registerTask('default', ['patternlab', 'copy:main', 'copy:styleguide']);
31+
grunt.loadNpmTasks('grunt-contrib-concat');
32+
grunt.loadNpmTasks('grunt-eslint');
33+
grunt.loadNpmTasks('grunt-contrib-nodeunit');
16034

16135
//travis CI task
162-
grunt.registerTask('travis', ['nodeunit', 'eslint', 'patternlab']);
163-
164-
grunt.registerTask('serve', ['patternlab', 'copy:main', 'copy:styleguide', 'browserSync', 'watch:all']);
36+
grunt.registerTask('travis', ['nodeunit', 'eslint']);
16537

38+
//to be run prior to releasing a version
16639
grunt.registerTask('build', ['nodeunit', 'eslint', 'concat']);
16740

16841
};

0 commit comments

Comments
 (0)