Skip to content

Commit c6620c4

Browse files
author
K.C. Hunter
committed
Initial web page setup
1 parent d12fb3a commit c6620c4

9 files changed

Lines changed: 12981 additions & 2 deletions

File tree

GruntFile.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
module.exports = function (grunt)
2+
{
3+
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json'),
5+
concat: {
6+
options: {
7+
separator: "\n\n"
8+
},
9+
dist: {
10+
src: [],
11+
dest: 'src/resources/js/<%= pkg.name %>.js'
12+
},
13+
deps: {
14+
src: [
15+
'bower_components/modernizr/modernizr.js',
16+
'bower_components/bootstrap/dist/js/bootstrap.js',
17+
'bower_components/jquery/dist/jquery.js',
18+
'bower_components/angularjs/angularjs.min.js',
19+
],
20+
dest: 'src/resources/js/<%= pkg.name %>-deps.js'
21+
},
22+
css: {
23+
src: ['bower_components/bootstrap/dist/css/bootstrap.min.css',
24+
'src/resources/css/styles.css'
25+
],
26+
dest: 'src/resources/css/<%= pkg.name %>.css'
27+
}
28+
},
29+
30+
sass: {
31+
dev: {
32+
files: {
33+
'src/resources/css/styles.css': 'src/resources/css/styles.scss'
34+
}
35+
}
36+
},
37+
38+
watch: {
39+
scripts: {
40+
files: ['src/resources/js/**/*.js'],
41+
tasks: ['concat:dist']
42+
},
43+
styles: {
44+
files: ['src/resources/css/*.scss'],
45+
tasks: ['sass']
46+
}
47+
}
48+
});
49+
50+
//npm tasks
51+
grunt.loadNpmTasks('grunt-contrib-concat');
52+
grunt.loadNpmTasks('grunt-contrib-copy');
53+
grunt.loadNpmTasks('grunt-contrib-sass');
54+
grunt.loadNpmTasks('grunt-contrib-uglify');
55+
grunt.loadNpmTasks('grunt-contrib-watch');
56+
grunt.loadNpmTasks('grunt-ngdocs');
57+
58+
//tasks
59+
grunt.registerTask('default', 'Default Task Alias', ['build']);
60+
61+
grunt.registerTask('build', 'Build the application',
62+
['sass:dev',
63+
'concat'
64+
]);
65+
}

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
{
2-
"name": "angularjs",
2+
"name": "angularjstutorial",
33
"version": "1.0.0",
44
"description": "AccioCode AngularJS tutorial series.",
55
"main": "index.js",
66
"dependencies": {
77
"bower": "~1.3.12",
88
"grunt-cli": "~0.1.13"
99
},
10-
"devDependencies": {},
10+
"devDependencies": {
11+
"grunt-contrib-uglify": "~0.6.0",
12+
"grunt-contrib-concat": "~0.5.0",
13+
"grunt-contrib-sass": "~0.8.1",
14+
"grunt-contrib-copy": "~0.7.0",
15+
"grunt-contrib-watch": "~0.6.1",
16+
"grunt-ngdocs": "~0.2.6"
17+
},
1118
"scripts": {
1219
"test": "echo \"Error: no test specified\" && exit 1"
1320
},

src/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@
55
<meta charset="utf-8">
66
<meta http-equiv="X-UA-COMPATIBLE" content="IE=edge,chrome=1">
77
<meta name="viewport" content="width=device-width, user-scalable=no">
8+
<script src="resources/js/angularjstutorial-deps.js"></script>
9+
<script src="resources/js/angularjstutorial.js"></script>
810

11+
<link rel="stylesheet" href="resources/css/angularjstutorial.css">
912
</head>
1013
<body>
1114

15+
<div class="mainContainer">
16+
<h1>AngularJS Tutorial</h1>
17+
<button class="btn btn-default">Here we go</button>
18+
</div>
19+
1220
</body>
1321
</html>

src/resources/css/angularjstutorial.css

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/css/styles.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
html, body {
2+
width: 100%;
3+
height: 100%;
4+
padding: 0;
5+
margin: 0; }

src/resources/css/styles.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
html, body {
2+
width: 100%;
3+
height: 100%;
4+
padding: 0;
5+
margin: 0;
6+
}

0 commit comments

Comments
 (0)