-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from dgt41/fields-js
Easy maintenance of 3rd libs (assets) part1
- Loading branch information
Showing
31 changed files
with
18,220 additions
and
4,262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
module.exports = function(grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
folder : { | ||
system : '../media/system/js', | ||
fields : '../media/system/js/fields' | ||
}, | ||
uglify: { | ||
build: { | ||
files: [ | ||
{ | ||
src: ['<%= folder.system %>/*.js','!<%= folder.system %>/*.min.js'], | ||
dest: '', | ||
expand: true, | ||
ext: '.min.js' | ||
}, | ||
{ | ||
src: ['<%= folder.fields %>/*.js','!<%= folder.fields %>/*.min.js'], | ||
dest: '', | ||
expand: true, | ||
ext: '.min.js' | ||
} | ||
] | ||
} | ||
}, | ||
copy: { | ||
transfer: { | ||
files: [ | ||
{ // jQuery files | ||
expand: true, | ||
cwd: 'assets/node_modules/jquery/dist/', | ||
src: ['**'], | ||
dest: '../media/vendor/jquery/js/', | ||
filter: 'isFile' | ||
}, | ||
{ // jQuery migrate files | ||
expand: true, | ||
cwd: 'assets/node_modules/jquery-migrate/dist/', | ||
src: ['**'], | ||
dest: '../media/vendor/jquery/js/', | ||
filter: 'isFile' | ||
}, | ||
{ //Bootastrap js files | ||
expand: true, | ||
cwd: 'assets/node_modules/bootstrap/dist/js/', | ||
src: ['**'], | ||
dest: '../media/vendor/bootstrap/js/', | ||
filter: 'isFile' | ||
}, | ||
{ //Bootastrap scss files | ||
expand: true, | ||
cwd: 'assets/node_modules/bootstrap/scss/', | ||
src: ['**'], | ||
dest: '../media/vendor/bootstrap/scss/', | ||
filter: 'isFile' | ||
}, | ||
{ //Bootastrap css files | ||
expand: true, | ||
cwd: 'assets/node_modules/bootstrap/dist/css/', | ||
src: ['**'], | ||
dest: '../media/vendor/bootstrap/css/', | ||
filter: 'isFile' | ||
}, | ||
{ //Teether js files | ||
expand: true, | ||
cwd: 'assets/node_modules/tether/dist/js/', | ||
src: ['**'], | ||
dest: '../media/vendor/tether/js/', | ||
filter: 'isFile' | ||
}, | ||
{ //Font Awesome css files | ||
expand: true, | ||
cwd: 'assets/node_modules/font-awesome/css/', | ||
src: ['**'], | ||
dest: '../media/vendor/font-awesome/css/', | ||
filter: 'isFile' | ||
}, | ||
{ //Font Awesome scss files | ||
expand: true, | ||
cwd: 'assets/node_modules/font-awesome/scss/', | ||
src: ['**'], | ||
dest: '../media/vendor/font-awesome/scss/', | ||
filter: 'isFile' | ||
}, | ||
{ //Font Awesome fonts files | ||
expand: true, | ||
cwd: 'assets/node_modules/font-awesome/fonts/', | ||
src: ['**'], | ||
dest: '../media/vendor/font-awesome/fonts/', | ||
filter: 'isFile' | ||
}, | ||
// // Licenses | ||
// { // jQuery files | ||
// src: ['assets/node_modules/jquery/LICENSE.txt'], | ||
// dest: '../media/vendor/jquery/' | ||
// }, | ||
// { // Bootstrap files | ||
// src: [ | ||
// 'assets/node_modules/bootstrap/LICENSE', | ||
// ], | ||
// dest: '../media/vendor/bootstrap/' | ||
// }, | ||
// { // Bootstrap files | ||
// src: [ | ||
// 'assets/node_modules/bootstrap/node_modules/tether/LICENSE', | ||
// ], | ||
// dest: '../media/vendor/tether/LICENSE', | ||
// }, | ||
] | ||
} | ||
} | ||
}); | ||
|
||
// Load required modules | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
|
||
grunt.registerTask('default', ['build', 'transfer']); | ||
|
||
grunt.registerTask('build', ['uglify']); | ||
|
||
grunt.registerTask('transfer', ['copy']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "joomla-assets", | ||
"version": "4.0.0", | ||
"description": "External assets that Joomla is using", | ||
"dependencies": { | ||
"jquery": "3.1.0", | ||
"jquery-migrate": "3.0.0", | ||
"bootstrap": "4.0.0-alpha.4", | ||
"tether": "1.3.7", | ||
"font-awesome": "4.6.3", | ||
"tinymce": "4.4.3" | ||
}, | ||
"license": "GPL-2.0+" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#### Developers Area | ||
|
||
Install Node: https://nodejs.org/en/ | ||
Install Bower: `npm install -g bower` | ||
|
||
### Folder: Static | ||
|
||
Contains all the external sourced static assets that Joomla is using. | ||
|
||
- Jquery: version 3 | ||
- Bootstrap version 4 | ||
- TinyMCE: version latest | ||
- Code mirror version 5 | ||
- BS select version latest | ||
- Punycode version latest | ||
|
||
|
||
PLEASE UPDATE VERSION NUMBERS HERE AS WELL AS THE package.json! | ||
|
||
@TODO: Add all the rest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "joomla", | ||
"version": "4.0.0", | ||
"description": "Joomla CMS", | ||
"dependencies": { | ||
"grunt": "~0.4", | ||
"grunt-contrib-uglify": "~1.0.1" | ||
}, | ||
"license": "GPL-2.0+", | ||
"devDependencies": { | ||
"grunt-contrib-copy": "^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#### Maintainer's Area | ||
|
||
Install Node: https://nodejs.org/en/ | ||
Run: `npm install` in this folder | ||
Run: `grunt` will minify all javscripts in system/js and copy the 3rd part libs to media/vedor/* | ||
|
||
To do only the second just run `grunt copy` | ||
|
||
Make sure that you have updated the assets/package.json and ran 'npm install' in the sub directory assets, | ||
in order to update the libraries!!! | ||
@TODO: Add more functionality (maybe) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.