-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fork from https://github.com/Voog/design-anchorage
- Loading branch information
0 parents
commit 58c47b1
Showing
139 changed files
with
27,636 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Hidden files | ||
.DS_Store | ||
.sass-cache | ||
.voog | ||
|
||
# Visible files | ||
|
||
# Folders | ||
bower_components/ | ||
node_modules/ |
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,295 @@ | ||
module.exports = function(grunt) { | ||
'use strict'; | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
// Removes old files. | ||
clean: { | ||
reset: { | ||
src: ['assets', 'images', 'javascripts', 'stylesheets'] | ||
}, | ||
|
||
remove: { | ||
src: ['sources/components/custom-styles/tmp'] | ||
} | ||
}, | ||
|
||
modernizr_builder: { | ||
build: { | ||
options: { | ||
config: 'modernizr-config.json', | ||
dest: 'javascripts/modernizr-custom.min.js', | ||
uglify: true | ||
} | ||
} | ||
}, | ||
|
||
// Concatenates the javascript source files to the javascripts folder. | ||
concat: { | ||
build: { | ||
src: [ | ||
'bower_components/textarea-autosize/dist/jquery.textarea_autosize.js', | ||
'sources/javascripts/concat/*.js' | ||
], | ||
dest: 'javascripts/main.js' | ||
} | ||
}, | ||
|
||
// Minifies the javascript files. | ||
uglify: { | ||
build: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'javascripts/', | ||
src: [ | ||
'*.js', | ||
'!*.min.js' | ||
], | ||
dest: 'javascripts/', | ||
ext: '.min.js' | ||
}] | ||
} | ||
}, | ||
|
||
// Compiles the stylesheet files. | ||
sass: { | ||
build_main: { | ||
options: { | ||
style: 'expanded', | ||
sourcemap: 'none' | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: 'sources/stylesheets', | ||
src: 'main.scss', | ||
dest: 'stylesheets/', | ||
ext: '.css' | ||
}] | ||
}, | ||
|
||
// Builds custom style components to temporary folder. | ||
build_custom_styles: { | ||
options: { | ||
style: 'expanded', | ||
sourcemap: 'none' | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: 'sources/components/custom-styles', | ||
src: '*.scss', | ||
dest: 'sources/components/custom-styles/tmp', | ||
ext: '.css' | ||
}] | ||
} | ||
}, | ||
|
||
postcss: { | ||
options: { | ||
processors: [ | ||
require('autoprefixer')({browsers: 'last 4 versions'}) | ||
] | ||
}, | ||
main_styles: { | ||
src: [ | ||
'stylesheets/*.css', | ||
'stylesheets/!*.min.css' | ||
] | ||
}, | ||
custom_styles: { | ||
src: [ | ||
'sources/components/custom-styles/tmp/*.css' | ||
] | ||
} | ||
}, | ||
|
||
// Minifies the stylesheet files. | ||
cssmin: { | ||
build: { | ||
expand: true, | ||
cwd: 'stylesheets/', | ||
src: [ | ||
'*.css', | ||
'!*.min.css' | ||
], | ||
dest: 'stylesheets/', | ||
ext: '.min.css' | ||
} | ||
}, | ||
|
||
// Minifies the image files. | ||
imagemin: { | ||
build_images: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'sources/images/minify', | ||
src: '*.{png,jpg,gif}', | ||
dest: 'images/' | ||
}] | ||
}, | ||
|
||
build_assets: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'sources/assets/minify', | ||
src: '*.svg', | ||
dest: 'assets/' | ||
}] | ||
} | ||
}, | ||
|
||
// Copys the files from the source folders to the layout folders. | ||
copy: { | ||
assets: { | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: 'sources/assets/copy', | ||
src: '*', | ||
dest: 'assets/' | ||
} | ||
] | ||
}, | ||
|
||
images: { | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: 'sources/images/copy', | ||
src: '*', | ||
dest: 'images/' | ||
} | ||
] | ||
}, | ||
|
||
javascripts: { | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: 'sources/javascripts/copy', | ||
src: '*', | ||
dest: 'javascripts/' | ||
} | ||
] | ||
}, | ||
|
||
// Copies the compiled css files from temporary folder to "components" | ||
// folder and renames the files to ""*.tpl". | ||
custom_styles: { | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: 'sources/components/custom-styles/tmp', | ||
src: '*.css', | ||
dest: 'components', | ||
ext: '.tpl' | ||
} | ||
] | ||
} | ||
}, | ||
|
||
// Executes the Voog Kit toolkit manifest generation and file upload commands. | ||
exec: { | ||
kitmanifest: { | ||
cmd: function(file) { | ||
return 'kit manifest'; | ||
} | ||
}, | ||
|
||
kit: { | ||
cmd: function(file) { | ||
if (grunt.option('site')) { | ||
return 'kit push -s ' + grunt.option('site') + ' ' + file; | ||
} else { | ||
return 'kit push ' + file; | ||
} | ||
} | ||
} | ||
}, | ||
|
||
// Watches the project for changes and recompiles the output files. | ||
watch: { | ||
modernizr: { | ||
files: 'modernizr-config.json', | ||
tasks: ['modernizr_builder:build'] | ||
}, | ||
|
||
js_copy: { | ||
files: 'sources/javascripts/copy/*.js', | ||
tasks: ['copy:javascripts', 'exec:kitmanifest', 'exec:kit:javascripts/*.js'] | ||
}, | ||
|
||
js_concat: { | ||
files: 'sources/javascripts/concat/*.js', | ||
tasks: ['concat:build', 'uglify:build', 'exec:kitmanifest', 'exec:kit:javascripts/*.js'] | ||
}, | ||
|
||
css_main: { | ||
files: [ | ||
'sources/stylesheets/*.scss', | ||
'sources/stylesheets/*/*.scss', | ||
], | ||
tasks: ['sass:build_main', 'postcss', 'cssmin:build', 'exec:kitmanifest', 'exec:kit:stylesheets/*.css'] | ||
}, | ||
|
||
custom_styles: { | ||
files: 'sources/components/custom-styles/*.scss', | ||
tasks: ['sass:build_custom_styles', 'postcss:custom_styles', 'copy:custom_styles', 'clean:remove', 'exec:kitmanifest'] | ||
}, | ||
|
||
img_copy: { | ||
files: 'sources/images/copy/*', | ||
tasks: [ 'copy:images', 'exec:kitmanifest', 'exec:kit:images/*'] | ||
}, | ||
|
||
img_minify: { | ||
files: 'sources/images/minify/*', | ||
tasks: ['imagemin:build_images', 'exec:kitmanifest', 'exec:kit:images/*'] | ||
}, | ||
|
||
assets_copy: { | ||
files: 'sources/assets/copy/*', | ||
tasks: ['copy:assets', 'exec:kitmanifest', 'exec:kit:assets/*'] | ||
}, | ||
|
||
assets_minify: { | ||
files: 'sources/assets/minify/*', | ||
tasks: ['imagemin:build_assets', 'exec:kitmanifest', 'exec:kit:assets/*'] | ||
}, | ||
|
||
voog: { | ||
files: ['layouts/*.tpl', 'components/*.tpl'], | ||
options: { | ||
spawn: false | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
grunt.loadNpmTasks('grunt-contrib-imagemin'); | ||
grunt.loadNpmTasks('grunt-contrib-sass'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-exec'); | ||
grunt.loadNpmTasks('grunt-modernizr-builder'); | ||
grunt.loadNpmTasks('grunt-postcss'); | ||
|
||
grunt.registerTask('default', ['clean:reset', 'modernizr_builder', 'concat', 'uglify', 'sass', 'postcss:main_styles', 'cssmin', 'imagemin', 'postcss:custom_styles', 'copy', 'clean:remove']); | ||
|
||
grunt.event.on('watch', function(action, filepath, target) { | ||
if (target == 'voog') { | ||
if (action == 'added' || action == 'deleted') { | ||
grunt.task.run(['exec:kitmanifest']); | ||
} | ||
if (grunt.file.exists('.voog')) { | ||
if (action != 'deleted') { | ||
grunt.task.run(['exec:kit:' + filepath]); | ||
} | ||
} | ||
} | ||
}); | ||
}; |
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,24 @@ | ||
# The Dorpat design template for [Voog](https://www.voog.com) | ||
|
||
## Set up the developing environment | ||
To modify this template [Node Package Manager](https://www.npmjs.org/) (or [Node.js](http://www.nodejs.org/)), [Bower](http://www.bower.io/) and [Grunt](http://www.gruntjs.com/) must be installed. | ||
|
||
To set up the local developing environment, clone this repository and run the following commands: | ||
|
||
* Install Grunt dependencies: ```npm install``` | ||
* Install Bower dependencies: ```bower install``` | ||
* Run Grunt tasks: ```grunt``` | ||
|
||
To sync the template with your **Voog** sites, set up the [Voog Developer Toolkit](http://www.voog.com/developers/kit) | ||
|
||
## Watch and update modifications | ||
* To watch (and synchronize) modified files in real time (**on the default site**) start the Grunt watcher task: | ||
* **Example:** ```grunt watch``` | ||
* **Notes:** | ||
* Default site is the first site defined in the **.voog** configuration file. | ||
* If the **.voog** file is missing, the watcher will only update the output files on the local computer. | ||
* To watch **specific site** start the Grunt watcher with **--site** parameter value. | ||
* **Example:** ```grunt watch --site=mysite.voog.com``` | ||
* **Notes:** | ||
* Possible **--site** values are the site names defined in the **.voog** configuration file. | ||
* If the **.voog** file is missing, the watcher will ignore the **--site** parameter and updates the output files only on the local computer. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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": "voog-design-dorpat", | ||
"homepage": "https://github.com/Voog/design-dorpat", | ||
"authors": [ | ||
"Siim Häelm <[email protected]>" | ||
], | ||
"description": "The Dorpat design template for Voog", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"bourbon": "^4.3.4", | ||
"textarea-autosize": "^0.4.2" | ||
} | ||
} |
Oops, something went wrong.