Skip to content

Commit e6ecfd4

Browse files
committed
Agregando Scaffolding de Yeoman
1 parent 437d34d commit e6ecfd4

Some content is hidden

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

68 files changed

+7996
-1
lines changed

Diff for: .bowerrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "app/components"
3+
}

Diff for: .editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = space
12+
indent_size = 2
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

Diff for: .gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
.tmp
4+
.sass-cache
5+
app/components
6+
dist

Diff for: .jshintrc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"node": true,
3+
"browser": true,
4+
"es5": true,
5+
"esnext": true,
6+
"bitwise": true,
7+
"camelcase": true,
8+
"curly": true,
9+
"eqeqeq": true,
10+
"immed": true,
11+
"indent": 2,
12+
"latedef": true,
13+
"newcap": true,
14+
"noarg": true,
15+
"quotmark": "single",
16+
"regexp": true,
17+
"undef": true,
18+
"unused": true,
19+
"strict": true,
20+
"trailing": true,
21+
"smarttabs": true,
22+
"globals": {
23+
"angular": false
24+
}
25+
}

Diff for: Gruntfile.js

+303
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
'use strict';
2+
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
3+
var mountFolder = function (connect, dir) {
4+
return connect.static(require('path').resolve(dir));
5+
};
6+
7+
module.exports = function (grunt) {
8+
// load all grunt tasks
9+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
10+
11+
// configurable paths
12+
var yeomanConfig = {
13+
app: 'app',
14+
dist: 'dist'
15+
};
16+
17+
try {
18+
yeomanConfig.app = require('./component.json').appPath || yeomanConfig.app;
19+
} catch (e) {}
20+
21+
grunt.initConfig({
22+
yeoman: yeomanConfig,
23+
watch: {
24+
coffee: {
25+
files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
26+
tasks: ['coffee:dist']
27+
},
28+
coffeeTest: {
29+
files: ['test/spec/{,*/}*.coffee'],
30+
tasks: ['coffee:test']
31+
},
32+
compass: {
33+
files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
34+
tasks: ['compass']
35+
},
36+
livereload: {
37+
files: [
38+
'<%= yeoman.app %>/{,*/}*.html',
39+
'{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
40+
'{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
41+
'<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
42+
],
43+
tasks: ['livereload']
44+
}
45+
},
46+
connect: {
47+
options: {
48+
port: 9000,
49+
// Change this to '0.0.0.0' to access the server from outside.
50+
hostname: 'localhost'
51+
},
52+
livereload: {
53+
options: {
54+
middleware: function (connect) {
55+
return [
56+
lrSnippet,
57+
mountFolder(connect, '.tmp'),
58+
mountFolder(connect, yeomanConfig.app)
59+
];
60+
}
61+
}
62+
},
63+
test: {
64+
options: {
65+
middleware: function (connect) {
66+
return [
67+
mountFolder(connect, '.tmp'),
68+
mountFolder(connect, 'test')
69+
];
70+
}
71+
}
72+
}
73+
},
74+
open: {
75+
server: {
76+
url: 'http://localhost:<%= connect.options.port %>'
77+
}
78+
},
79+
clean: {
80+
dist: {
81+
files: [{
82+
dot: true,
83+
src: [
84+
'.tmp',
85+
'<%= yeoman.dist %>/*',
86+
'!<%= yeoman.dist %>/.git*'
87+
]
88+
}]
89+
},
90+
server: '.tmp'
91+
},
92+
jshint: {
93+
options: {
94+
jshintrc: '.jshintrc'
95+
},
96+
all: [
97+
'Gruntfile.js',
98+
'<%= yeoman.app %>/scripts/{,*/}*.js'
99+
]
100+
},
101+
karma: {
102+
unit: {
103+
configFile: 'karma.conf.js',
104+
singleRun: true
105+
}
106+
},
107+
coffee: {
108+
dist: {
109+
files: [{
110+
expand: true,
111+
cwd: '<%= yeoman.app %>/scripts',
112+
src: '{,*/}*.coffee',
113+
dest: '.tmp/scripts',
114+
ext: '.js'
115+
}]
116+
},
117+
test: {
118+
files: [{
119+
expand: true,
120+
cwd: 'test/spec',
121+
src: '{,*/}*.coffee',
122+
dest: '.tmp/spec',
123+
ext: '.js'
124+
}]
125+
}
126+
},
127+
compass: {
128+
options: {
129+
sassDir: '<%= yeoman.app %>/styles',
130+
cssDir: '.tmp/styles',
131+
imagesDir: '<%= yeoman.app %>/images',
132+
javascriptsDir: '<%= yeoman.app %>/scripts',
133+
fontsDir: '<%= yeoman.app %>/styles/fonts',
134+
importPath: '<%= yeoman.app %>/components',
135+
relativeAssets: true
136+
},
137+
dist: {},
138+
server: {
139+
options: {
140+
debugInfo: true
141+
}
142+
}
143+
},
144+
concat: {
145+
dist: {
146+
files: {
147+
'<%= yeoman.dist %>/scripts/scripts.js': [
148+
'.tmp/scripts/{,*/}*.js',
149+
'<%= yeoman.app %>/scripts/{,*/}*.js'
150+
]
151+
}
152+
}
153+
},
154+
useminPrepare: {
155+
html: '<%= yeoman.app %>/index.html',
156+
options: {
157+
dest: '<%= yeoman.dist %>'
158+
}
159+
},
160+
usemin: {
161+
html: ['<%= yeoman.dist %>/{,*/}*.html'],
162+
css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
163+
options: {
164+
dirs: ['<%= yeoman.dist %>']
165+
}
166+
},
167+
imagemin: {
168+
dist: {
169+
files: [{
170+
expand: true,
171+
cwd: '<%= yeoman.app %>/images',
172+
src: '{,*/}*.{png,jpg,jpeg}',
173+
dest: '<%= yeoman.dist %>/images'
174+
}]
175+
}
176+
},
177+
cssmin: {
178+
dist: {
179+
files: {
180+
'<%= yeoman.dist %>/styles/main.css': [
181+
'.tmp/styles/{,*/}*.css',
182+
'<%= yeoman.app %>/styles/{,*/}*.css'
183+
]
184+
}
185+
}
186+
},
187+
htmlmin: {
188+
dist: {
189+
options: {
190+
/*removeCommentsFromCDATA: true,
191+
// https://github.com/yeoman/grunt-usemin/issues/44
192+
//collapseWhitespace: true,
193+
collapseBooleanAttributes: true,
194+
removeAttributeQuotes: true,
195+
removeRedundantAttributes: true,
196+
useShortDoctype: true,
197+
removeEmptyAttributes: true,
198+
removeOptionalTags: true*/
199+
},
200+
files: [{
201+
expand: true,
202+
cwd: '<%= yeoman.app %>',
203+
src: ['*.html', 'views/*.html'],
204+
dest: '<%= yeoman.dist %>'
205+
}]
206+
}
207+
},
208+
cdnify: {
209+
dist: {
210+
html: ['<%= yeoman.dist %>/*.html']
211+
}
212+
},
213+
ngmin: {
214+
dist: {
215+
files: [{
216+
expand: true,
217+
cwd: '<%= yeoman.dist %>/scripts',
218+
src: '*.js',
219+
dest: '<%= yeoman.dist %>/scripts'
220+
}]
221+
}
222+
},
223+
uglify: {
224+
dist: {
225+
files: {
226+
'<%= yeoman.dist %>/scripts/scripts.js': [
227+
'<%= yeoman.dist %>/scripts/scripts.js'
228+
]
229+
}
230+
}
231+
},
232+
rev: {
233+
dist: {
234+
files: {
235+
src: [
236+
'<%= yeoman.dist %>/scripts/{,*/}*.js',
237+
'<%= yeoman.dist %>/styles/{,*/}*.css',
238+
'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
239+
'<%= yeoman.dist %>/styles/fonts/*'
240+
]
241+
}
242+
}
243+
},
244+
copy: {
245+
dist: {
246+
files: [{
247+
expand: true,
248+
dot: true,
249+
cwd: '<%= yeoman.app %>',
250+
dest: '<%= yeoman.dist %>',
251+
src: [
252+
'*.{ico,txt}',
253+
'.htaccess',
254+
'components/**/*',
255+
'images/{,*/}*.{gif,webp}',
256+
'styles/fonts/*'
257+
]
258+
}]
259+
}
260+
}
261+
});
262+
263+
grunt.renameTask('regarde', 'watch');
264+
265+
grunt.registerTask('server', [
266+
'clean:server',
267+
'coffee:dist',
268+
'compass:server',
269+
'livereload-start',
270+
'connect:livereload',
271+
'open',
272+
'watch'
273+
]);
274+
275+
grunt.registerTask('test', [
276+
'clean:server',
277+
'coffee',
278+
'compass',
279+
'connect:test',
280+
'karma'
281+
]);
282+
283+
grunt.registerTask('build', [
284+
'clean:dist',
285+
'jshint',
286+
'test',
287+
'coffee',
288+
'compass:dist',
289+
'useminPrepare',
290+
'imagemin',
291+
'cssmin',
292+
'htmlmin',
293+
'concat',
294+
'copy',
295+
'cdnify',
296+
'ngmin',
297+
'uglify',
298+
'rev',
299+
'usemin'
300+
]);
301+
302+
grunt.registerTask('default', ['build']);
303+
};

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
77angulardemo
22
=============
33

4-
Repo con pruebas que estoy haciendo para 77 Digital
4+
Repo con pruebas que estoy haciendo para 77 Digital, con AngularJS, Yeoman, Bower, Grunt y toa la puya :>

Diff for: app/.buildignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.coffee

0 commit comments

Comments
 (0)