diff --git a/semantic.json b/semantic.json new file mode 100644 index 000000000..c5244203e --- /dev/null +++ b/semantic.json @@ -0,0 +1,20 @@ +{ + "base": "", + + "paths": { + "source": { + "config" : "src/semantic.config", + "definitions" : "src/definitions/", + "site" : "src/site/", + "themes" : "src/themes/" + }, + "output": { + "packaged" : "dist/", + "uncompressed" : "dist/components/", + "compressed" : "dist/components/", + "themes" : "dist/themes" + }, + "clean" : "dist/" + } + +} diff --git a/tasks/banner.js b/tasks/banner.js new file mode 100644 index 000000000..23dd11ee7 --- /dev/null +++ b/tasks/banner.js @@ -0,0 +1,12 @@ +module.exports = '' + + ' /*' + '\n' + + ' * # <%= package.title %>' + '\n' + + ' * <%= package.repository.url %>' + '\n' + + ' *' + '\n' + + ' *' + '\n' + + ' * Copyright 2014 Contributors' + '\n' + + ' * Released under the MIT license' + '\n' + + ' * http://opensource.org/licenses/MIT' + '\n' + + ' *' + '\n' + + ' */' + '\n' +; \ No newline at end of file diff --git a/tasks/comments.js b/tasks/comments.js new file mode 100644 index 000000000..73586c2b8 --- /dev/null +++ b/tasks/comments.js @@ -0,0 +1,20 @@ +module.exports = { + // remove variable comments from css + variables : { + in : /\/\*[\s\S]+\/\* End Config \*\//m, + out : '', + }, + // adds spacing around comments + large: { + in : /(\/\*\*\*\*[\s\S]+?\*\/)/mg, + out : '\n\n$1\n' + }, + small: { + in : /(\/\*---[\s\S]+?\*\/)/mg, + out : '\n$1\n' + }, + tiny: { + in : /(\/\* [\s\S]+? \*\/)/mg, + out : '\n$1' + } +}; \ No newline at end of file diff --git a/tasks/defaults.js b/tasks/defaults.js new file mode 100644 index 000000000..0d4dbe573 --- /dev/null +++ b/tasks/defaults.js @@ -0,0 +1,21 @@ +/******************************* + Default Paths +*******************************/ + +module.exports = { + paths: { + source: { + config : 'src/', + definitions : 'src/', + site : 'src/', + themes : 'src/' + }, + output: { + packaged : 'dist/', + uncompressed : 'dist/components/', + compressed : 'dist/components/', + themes : 'dist/themes' + }, + clean : 'dist/' + } +}; \ No newline at end of file diff --git a/tasks/log.js b/tasks/log.js new file mode 100644 index 000000000..5e2829c1e --- /dev/null +++ b/tasks/log.js @@ -0,0 +1,8 @@ +module.exports = { + created: function(file) { + return "Created: " + file; + }, + modified: function(file) { + return "Modified: " + file; + } +}; \ No newline at end of file diff --git a/tasks/questions.js b/tasks/questions.js new file mode 100644 index 000000000..c66ee6cdd --- /dev/null +++ b/tasks/questions.js @@ -0,0 +1,102 @@ +/******************************* + Set-up Questions +*******************************/ + +var defaults = require('./defaults'); + +module.exports = { + + setup: [ + { + type: 'list', + name: 'install', + message: 'First run: Set-up Semantic UI', + choices: [ + 'Automatic (Use defaults locations and all packages)', + 'Express (Set components and output folder)', + 'Custom (Customize all config values)' + ] + }, + { + type: 'input', + name: 'site', + message: 'Where should we put your site folder?', + default: defaults.paths.source.site + }, + { + type: 'input', + name: 'config', + message: 'Where should we put your semantic.config file?', + default: defaults.paths.source.config + }, + { + type: 'input', + name: 'dest', + message: 'Where should we compile semantic to?', + default: defaults.paths.output.packaged + }, + { + type: 'input', + name: 'dest', + message: 'Where should we output compressed components?', + default: defaults.paths.output.compressed + }, + { + type: 'input', + name: 'dest', + message: 'Where should we output uncompressed components?', + default: defaults.paths.output.uncompressed + }, + { + type: 'checkbox', + name: 'components', + message: 'What components should we include in the package? (Toggle with spacebar)', + choices: [ + {name: "Button", checked: true }, + {name: "Divider", checked: true }, + {name: "Flag", checked: true }, + {name: "Header", checked: true }, + {name: "Icon", checked: true }, + {name: "Image", checked: true }, + {name: "Input", checked: true }, + {name: "Label", checked: true }, + {name: "List", checked: true }, + {name: "Loader", checked: true }, + {name: "Rail", checked: true }, + {name: "Reveal", checked: true }, + {name: "Segment", checked: true }, + {name: "Step", checked: true }, + {name: "Breadcrumb", checked: true }, + {name: "Form", checked: true }, + {name: "Grid", checked: true }, + {name: "Menu", checked: true }, + {name: "Message", checked: true }, + {name: "Table", checked: true }, + {name: "Card", checked: true }, + {name: "Comment", checked: true }, + {name: "Feed", checked: true }, + {name: "Item", checked: true }, + {name: "Statistic", checked: true }, + {name: "Accordion", checked: true }, + {name: "Checkbox", checked: true }, + {name: "Dimmer", checked: true }, + {name: "Dropdown", checked: true }, + {name: "Modal", checked: true }, + {name: "Nag", checked: true }, + {name: "Popup", checked: true }, + {name: "Progress", checked: true }, + {name: "Rating", checked: true }, + {name: "Search", checked: true }, + {name: "Shape", checked: true }, + {name: "Sidebar", checked: true }, + {name: "Sticky", checked: true }, + {name: "Tab", checked: true }, + {name: "Transition", checked: true }, + {name: "Video", checked: true }, + {name: "Api", checked: true }, + {name: "Form ", checked: true } + ] + } + ] + +}; \ No newline at end of file diff --git a/tasks/settings.js b/tasks/settings.js new file mode 100644 index 000000000..5557003ed --- /dev/null +++ b/tasks/settings.js @@ -0,0 +1,39 @@ + +var package = require('../package.json'); + +module.export = { + del: { + silent: true + }, + minify: { + processImport: false, + keepSpecialComments: 0 + }, + uglify: { + mangle: true + }, + prefix: { + browsers: [ + "last 2 version", + "> 1%", + "opera 12.1", + "safari 6", + "ie 9", + "bb 10", + "android 4" + ] + }, + header: { + package: package + }, + sourcemap: { + includeContent: true, + sourceRoot: '/src' + }, + minJS: { + extname: '.min.js' + }, + minCSS: { + extname: '.min.css' + } +}; \ No newline at end of file