зеркало из https://github.com/mozilla/brackets.git
inital pass at compiling less files
This commit is contained in:
Родитель
ecc9ab391e
Коммит
86c003c184
|
@ -1,6 +1,4 @@
|
|||
Thumbs.db
|
||||
src/brackets.css
|
||||
src/brackets.min.css
|
||||
|
||||
# ignore jenkins build info
|
||||
/build.prop
|
||||
|
@ -9,6 +7,9 @@ src/brackets.min.css
|
|||
/node_modules
|
||||
/npm-debug.log
|
||||
|
||||
# ignore compiled files
|
||||
dist
|
||||
src/styles/brackets.css
|
||||
|
||||
# ignore everything in the dev extension directory EXCEPT the README
|
||||
# (so that the directory is non-empty and can be in git)
|
||||
|
|
69
Gruntfile.js
69
Gruntfile.js
|
@ -24,11 +24,66 @@
|
|||
module.exports = function (grunt) {
|
||||
'use strict';
|
||||
|
||||
// load dependencies
|
||||
grunt.loadTasks('tasks');
|
||||
|
||||
[
|
||||
'grunt-contrib-jasmine',
|
||||
'grunt-contrib-jshint',
|
||||
'grunt-contrib-watch',
|
||||
'grunt-contrib-clean',
|
||||
'grunt-contrib-copy',
|
||||
'grunt-contrib-concat',
|
||||
'grunt-contrib-uglify',
|
||||
'grunt-contrib-cssmin',
|
||||
'grunt-contrib-concat',
|
||||
'grunt-contrib-less',
|
||||
'grunt-jasmine-node',
|
||||
'grunt-usemin'
|
||||
].forEach(function (task) { grunt.loadNpmTasks(task); });
|
||||
|
||||
var common = require("./tasks/lib/common")(grunt);
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg : grunt.file.readJSON("package.json"),
|
||||
clean: {
|
||||
dist: ['dist']
|
||||
},
|
||||
copy: {
|
||||
dist: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
dest: 'dist/',
|
||||
cwd: 'src/',
|
||||
src: ['**']
|
||||
},
|
||||
{
|
||||
expand: true,
|
||||
dest: 'dist/css',
|
||||
cwd: 'src/styles',
|
||||
src: ['fonts/**', 'images/**']
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
less: {
|
||||
css: {
|
||||
files: {
|
||||
"src/styles/brackets.css": "src/styles/brackets.less"
|
||||
}
|
||||
}
|
||||
},
|
||||
useminPrepare: {
|
||||
html: ['dist/index.html']
|
||||
},
|
||||
usemin: {
|
||||
html: ['dist/index.html'],
|
||||
options: {
|
||||
dirs: ['dist/']
|
||||
}
|
||||
},
|
||||
meta : {
|
||||
src : [
|
||||
'src/**/*.js',
|
||||
|
@ -144,13 +199,6 @@ module.exports = function (grunt) {
|
|||
linux: "<%= shell.repo %>/installer/linux/debian/package-root/opt/brackets/brackets"
|
||||
}
|
||||
});
|
||||
|
||||
// load dependencies
|
||||
grunt.loadTasks('tasks');
|
||||
grunt.loadNpmTasks('grunt-contrib-jasmine');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-jasmine-node');
|
||||
|
||||
// task: install
|
||||
grunt.registerTask('install', ['write-config']);
|
||||
|
@ -164,5 +212,10 @@ module.exports = function (grunt) {
|
|||
grunt.registerTask('set-sprint', ['update-sprint-number', 'write-config']);
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['test']);
|
||||
grunt.registerTask('default', [
|
||||
'less', 'test', 'clean', 'copy',
|
||||
'useminPrepare',
|
||||
'concat', 'uglify', 'cssmin',
|
||||
'usemin'
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -23,6 +23,14 @@
|
|||
"grunt-contrib-watch": "0.3.1",
|
||||
"grunt-contrib-jasmine": "0.4.2",
|
||||
"grunt-template-jasmine-requirejs": "0.1.0",
|
||||
"grunt-contrib-cssmin": "0.6.0",
|
||||
"grunt-contrib-clean": "0.4.1",
|
||||
"grunt-contrib-copy": "0.4.1",
|
||||
"grunt-contrib-less": "0.5.1",
|
||||
"grunt-contrib-uglify": "0.2.0",
|
||||
"grunt-contrib-concat": "0.3.0",
|
||||
"grunt-contrib-watch": "0.4.3",
|
||||
"grunt-usemin": "0.1.11",
|
||||
"q": "0.9.2",
|
||||
"jshint": "2.1.4"
|
||||
},
|
||||
|
|
|
@ -38,9 +38,16 @@
|
|||
"phantomjs": "1.9.0-1",
|
||||
"grunt-lib-phantomjs": "0.3.0",
|
||||
"grunt-contrib-jshint": "0.6.0",
|
||||
"grunt-contrib-watch": "0.3.1",
|
||||
"grunt-contrib-watch": "0.4.3",
|
||||
"grunt-contrib-jasmine": "0.4.2",
|
||||
"grunt-template-jasmine-requirejs": "0.1.0",
|
||||
"grunt-contrib-cssmin": "0.6.0",
|
||||
"grunt-contrib-clean": "0.4.1",
|
||||
"grunt-contrib-copy": "0.4.1",
|
||||
"grunt-contrib-less": "0.5.1",
|
||||
"grunt-contrib-uglify": "0.2.0",
|
||||
"grunt-contrib-concat": "0.3.0",
|
||||
"grunt-usemin": "0.1.11",
|
||||
"q": "0.9.2",
|
||||
"jshint": "2.1.4"
|
||||
},
|
||||
|
|
|
@ -35,15 +35,17 @@
|
|||
<script type="application/javascript" src="xorigin.js">
|
||||
</script>
|
||||
|
||||
<!-- TODO (Issue #278): switch between runtime LESS compilation in dev mode and precompiled version -->
|
||||
<link rel="stylesheet/less" href="styles/brackets.less">
|
||||
<script src="thirdparty/less-1.4.2.min.js"></script>
|
||||
<script src="thirdparty/mustache/mustache.js"></script>
|
||||
<!-- <link rel="stylesheet" href="brackets.min.css"> -->
|
||||
|
||||
<!-- build:css css/brackets.min.css -->
|
||||
<link rel="stylesheet" type="text/css" href="thirdparty/CodeMirror2/lib/codemirror.css">
|
||||
<link rel="stylesheet" type="text/css" href="styles/brackets.css">
|
||||
<!-- endbuild -->
|
||||
|
||||
<!-- JavaScript -->
|
||||
|
||||
<!-- Pre-load third party scripts that cannot be async loaded. -->
|
||||
<!-- build:js js/thirdparty.min.js -->
|
||||
<script src="thirdparty/less-1.4.2.min.js"></script>
|
||||
<script src="thirdparty/mustache/mustache.js"></script>
|
||||
<script src="thirdparty/jquery-2.0.1.min.js"></script>
|
||||
<script src="thirdparty/CodeMirror2/lib/codemirror.js"></script>
|
||||
<script src="thirdparty/CodeMirror2/addon/fold/xml-fold.js"></script>
|
||||
|
@ -52,9 +54,8 @@
|
|||
<script src="thirdparty/CodeMirror2/addon/edit/closebrackets.js"></script>
|
||||
<script src="thirdparty/CodeMirror2/addon/edit/closetag.js"></script>
|
||||
<script src="thirdparty/CodeMirror2/addon/selection/active-line.js"></script>
|
||||
|
||||
<!-- JS for CodeMirror search support -->
|
||||
<script src="thirdparty/CodeMirror2/addon/search/searchcursor.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -31,12 +31,6 @@
|
|||
* processing order.
|
||||
*/
|
||||
|
||||
/* CSS imports */
|
||||
|
||||
// CodeMirror
|
||||
// Must wrap in quotes to avoid issue #1015 (true for all relative URLs to non-LESS files)
|
||||
@import "../thirdparty/CodeMirror2/lib/codemirror.css";
|
||||
|
||||
/* LESS imports */
|
||||
|
||||
// Bootstrap @ v.2.3.1
|
||||
|
|
Загрузка…
Ссылка в новой задаче