Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
inital pass at compiling less files
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonsanjose committed Oct 30, 2013
1 parent ecc9ab3 commit 86c003c
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 25 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Thumbs.db
src/brackets.css
src/brackets.min.css

# ignore jenkins build info
/build.prop
Expand All @@ -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)
Expand Down
69 changes: 61 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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']);
Expand All @@ -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'
]);
};
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
9 changes: 8 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
17 changes: 9 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
6 changes: 0 additions & 6 deletions src/styles/brackets_shared.less
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86c003c

Please sign in to comment.