Skip to content

Commit

Permalink
Prepare frontend dev stack
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Dec 15, 2016
1 parent 4971886 commit 9b52a3a
Show file tree
Hide file tree
Showing 92 changed files with 30,551 additions and 32 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "Resources/public/vendor"
}
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Resources/public/admin/css/style.css binary -merge
Resources/public/admin/css/*.css.map binary -merge
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.idea/
.tmp/
coverage/
extension/
vendor/
node_modules/
/vendor/
var/
composer.phar
composer.lock
Expand Down
96 changes: 96 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
'use strict';

module.exports = function (grunt) {
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);

// Automatically load required grunt tasks
require('jit-grunt')(grunt, {
lockfile: 'grunt-lock'
});

// Configurable paths
var config = {
sass_dir: 'Resources/sass/admin',
public_dir: 'Resources/public/admin'
};

// Define the configuration for all the tasks
grunt.initConfig({
// Project settings
config: config,

//Prevent multiple grunt instances
lockfile: {
grunt: {
path: 'grunt.lock'
}
},

// Watches files for changes and runs tasks based on the changed files
watch: {
gruntfile: {
files: ['Gruntfile.js'],
options: {
reload: true
}
},
sass: {
files: ['<%= config.sass_dir %>/{,*/}*.{scss,sass}'],
tasks: ['sass', 'postcss']
}
},

// Compiles Sass to CSS and generates necessary files if requested
sass: {
options: {
sourceMap: true,
sourceMapEmbed: true,
sourceMapContents: true,
includePaths: ['.']
},
dist: {
files: [{
expand: true,
cwd: '<%= config.sass_dir %>',
src: ['*.{scss,sass}'],
dest: '.tmp/css',
ext: '.css'
}]
}
},

postcss: {
options: {
map: true,
processors: [
// Add vendor prefixed styles
require('autoprefixer-core')({
browsers: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1']
})
]
},
dist: {
files: [{
expand: true,
cwd: '.tmp/css/',
src: '{,*/}*.css',
dest: '<%= config.public_dir %>/css'
}]
}
}
});

grunt.registerTask('serve', 'Start the server and preview your app', function () {
grunt.task.run([
'lockfile',
'sass:dist',
'postcss',
'watch'
]);
});

grunt.registerTask('default', [
'serve'
]);
};
69 changes: 38 additions & 31 deletions Resources/public/admin/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions Resources/public/vendor/jquery/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "jquery",
"main": "dist/jquery.js",
"license": "MIT",
"ignore": [
"package.json"
],
"keywords": [
"jquery",
"javascript",
"browser",
"library"
],
"homepage": "https://github.com/jquery/jquery-dist",
"version": "3.1.1",
"_release": "3.1.1",
"_resolution": {
"type": "version",
"tag": "3.1.1",
"commit": "1b30f3ad466ebf2714d47eda34dbd7fdf6849fe3"
},
"_source": "https://github.com/jquery/jquery-dist.git",
"_target": "^3.0",
"_originalSource": "jquery"
}
Loading

0 comments on commit 9b52a3a

Please sign in to comment.