From b20691e774cac0cbf2ee174472a1b1dbc94fa61b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Sun, 30 Jun 2013 20:41:10 +0200 Subject: [PATCH 1/1] Building js & css for editor with r.js/lessc via grunt tasks --- .gitignore | 1 + Gruntfile.js | 32 ++++++++++++++++++++++++++++++++ package.json | 8 ++++++++ 3 files changed, 41 insertions(+) create mode 100644 .gitignore create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d163863 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..4d26c25 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,32 @@ +module.exports = function(grunt) { + + grunt.initConfig({ + requirejs: { + compile: { + options: { + baseUrl: '', + mainConfigFile: 'entrypoint.js', + out: 'build/rng.js', + name: 'entrypoint', + include: ['libs/require'] + } + } + }, + less: { + production: { + options: { + paths: [''], + yuicompress: true + }, + files: { + 'build/rng.css': 'styles/main.less' + }, + }, + } + }); + + grunt.loadNpmTasks('grunt-contrib-requirejs'); + grunt.loadNpmTasks('grunt-contrib-less'); + + grunt.registerTask('default', ['requirejs']); +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..b792de2 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "rng-editor", + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-requirejs": "~0.4.1", + "grunt-contrib-less": "~0.6.1" + } +} -- 2.20.1