[TASK] Introduce GruntJS 88/38088/5
authorBenjamin Kott <benjamin.kott@wfp2.com>
Mon, 23 Mar 2015 23:19:53 +0000 (00:19 +0100)
committerAndreas Fernandez <andreas.fernandez@aspedia.de>
Tue, 24 Mar 2015 09:39:45 +0000 (10:39 +0100)
In order to unify build processes in the backend we introduce
GruntJS as taskrunner. It will provide a global config that takes
over the responsibility for all build processes in the future
starting with the less files of the backend skin.

Releases: master
Resolves: #65960
Change-Id: I8319300ba5fe39fd9b889ea6992275644578c563
Reviewed-on: http://review.typo3.org/38088
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
.gitignore
Build/Gruntfile.js [new file with mode: 0644]
Build/package.json [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/7.1/Feature-65960-IntroduceGruntJS.rst [new file with mode: 0644]

index e4fdbba..50b0e17 100644 (file)
 .TemporaryItems
 .webprj
 bin/*
+Build/node_modules/*
 nbproject
 Packages/*
 typo3temp/*
 typo3conf/*
 fileadmin/*
 uploads/*
-composer.lock
+composer.lock
\ No newline at end of file
diff --git a/Build/Gruntfile.js b/Build/Gruntfile.js
new file mode 100644 (file)
index 0000000..8a7da2a
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+module.exports = function(grunt) {
+
+       // Project configuration.
+       grunt.initConfig({
+               pkg: grunt.file.readJSON('package.json'),
+               less: {
+                       t3skin: {
+                               options: {
+                                       outputSourceFiles: true,
+                               },
+                               src: '../typo3/sysext/t3skin/Resources/Private/Styles/t3skin.less',
+                               dest: '../typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css'
+                       }
+               },
+               watch: {
+                       less: {
+                               files: '../typo3/sysext/t3skin/Resources/Private/Styles/**/*.less',
+                               tasks: 'less'
+                       }
+               }
+       });
+
+       // Register tasks
+       grunt.loadNpmTasks('grunt-contrib-less');
+       grunt.loadNpmTasks('grunt-contrib-watch');
+
+};
diff --git a/Build/package.json b/Build/package.json
new file mode 100644 (file)
index 0000000..a51d2e6
--- /dev/null
@@ -0,0 +1,15 @@
+{
+       "name": "typo3-cms",
+       "description": "TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.",
+       "repository": "https://git.typo3.org/Packages/TYPO3.CMS.git",
+       "readme": "../README.md",
+       "homepage": "http://www.typo3.org",
+       "author": "TYPO3 CMS Core Team",
+       "version": "7.2.0-dev",
+       "license": "GPL-2.0+",
+       "devDependencies": {
+               "grunt": "~0.4.5",
+               "grunt-contrib-less": "~1.0.0",
+               "grunt-contrib-watch": "~0.6.1"
+       }
+}
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/7.1/Feature-65960-IntroduceGruntJS.rst b/typo3/sysext/core/Documentation/Changelog/7.1/Feature-65960-IntroduceGruntJS.rst
new file mode 100644 (file)
index 0000000..263f809
--- /dev/null
@@ -0,0 +1,42 @@
+===================================
+Feature: #63729 - Introduce GruntJS
+===================================
+
+Description
+===========
+
+In order to unify build processes in the backend we introduce
+`GruntJS <http://gruntjs.com/>`_ as a central taskrunner. It will
+provide a global config that takes over the responsibility
+for all build processes in the future starting with the less
+files of the backend skin.
+
+The build files are located in the *Build* folder located in the root directory.
+
+For detailed informations about setting up GruntJS please head to http://gruntjs.com/.
+
+
+Initial setup
+~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+       npm install
+       npm install -g grunt-cli
+
+
+Registered Tasks
+~~~~~~~~~~~~~~~~
+
+Compiling Less files:
+
+.. code-block:: bash
+
+       grunt less
+
+
+Watching Less files:
+
+.. code-block:: bash
+
+       grunt watch
\ No newline at end of file