зеркало из https://github.com/nextcloud/passman.git
Setup sass
This commit is contained in:
Родитель
74a0b06e8d
Коммит
b1d4ab0605
|
@ -1,2 +1,3 @@
|
|||
node_modules
|
||||
.idea
|
||||
.sass-cache
|
31
Gruntfile.js
31
Gruntfile.js
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
@import 'container';
|
||||
@import 'menu';
|
|
@ -0,0 +1,3 @@
|
|||
body{
|
||||
|
||||
}
|
|
@ -19,7 +19,7 @@ script('passman', 'app/controllers/main');
|
|||
/*
|
||||
* Styles
|
||||
*/
|
||||
style('passman', 'style');
|
||||
style('passman', 'app');
|
||||
?>
|
||||
|
||||
<div id="app" ng-app="passmanApp">
|
||||
|
|
Загрузка…
Ссылка в новой задаче