This commit is contained in:
brantje 2016-09-10 14:02:54 +02:00
Родитель 74a0b06e8d
Коммит b1d4ab0605
10 изменённых файлов: 44 добавлений и 10 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -1,2 +1,3 @@
node_modules
.idea
.sass-cache

Просмотреть файл

@ -6,7 +6,19 @@ module.exports = function (grunt) {
html2js: {
options: {
// custom options, see below
base: 'templates'
base: 'templates',
quoteChar: '\'',
useStrict: true,
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: false,
removeComments: true,
removeEmptyAttributes: false,
removeRedundantAttributes: true,
removeScriptTypeAttributes: false,
removeStyleLinkTypeAttributes: false
}
},
main: {
src: ['templates/views/**/*.html'],
@ -14,11 +26,25 @@ module.exports = function (grunt) {
}
},
sass: {
dist: {
files: [
{
expand: true,
cwd: "sass",
src: ["**/app.scss"],
dest: "css",
ext: ".css"
}
]
}
},
//@TODO JSHint, comile sass
watch: {
scripts: {
files: ['Gruntfile.js', 'views/*.html'],
tasks: ['html2js'],
tasks: ['html2js','sass'],
options: {
spawn: false,
interrupt: true,
@ -38,6 +64,7 @@ module.exports = function (grunt) {
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-html2js');
grunt.loadNpmTasks('grunt-contrib-watch');

Просмотреть файл

@ -1,3 +0,0 @@
#hello {
color: red;
}

Просмотреть файл

@ -1,6 +1,7 @@
angular.module('templates-main', ['views/main.html']);
angular.module("views/main.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("views/main.html",
"Hello world!");
angular.module('views/main.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/main.html',
'Hello world!');
}]);

Просмотреть файл

@ -5,8 +5,10 @@
"grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-uglify": "~0.5.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-html2js": "^0.3.6"
"grunt-html2js": "^0.3.6",
"html-minifier": "^3.0.2"
}
}

3
sass/app.scss Normal file
Просмотреть файл

@ -0,0 +1,3 @@
@import 'container';
@import 'menu';

3
sass/config.scss Normal file
Просмотреть файл

@ -0,0 +1,3 @@
body{
}

0
sass/container.scss Normal file
Просмотреть файл

0
sass/menu.scss Normal file
Просмотреть файл

Просмотреть файл

@ -19,7 +19,7 @@ script('passman', 'app/controllers/main');
/*
* Styles
*/
style('passman', 'style');
style('passman', 'app');
?>
<div id="app" ng-app="passmanApp">