|
@@ -0,0 +1,70 @@
|
|
|
+
|
|
|
+ * grunt-init-amber
|
|
|
+ * https:
|
|
|
+ *
|
|
|
+ * Copyright (c) 2013 Manfred Kroehnert, contributors
|
|
|
+ * Licensed under the MIT license.
|
|
|
+ */
|
|
|
+
|
|
|
+'use strict';
|
|
|
+
|
|
|
+
|
|
|
+exports.description = 'Create an Amber Smalltalk based application.';
|
|
|
+
|
|
|
+
|
|
|
+exports.notes = ' _Project title_ should be a human-readable title.';
|
|
|
+
|
|
|
+
|
|
|
+exports.after = 'You should now install project dependencies with _npm install_.' +
|
|
|
+ ' After that, you may execute project tasks with _grunt_.' +
|
|
|
+ ' Fmore information about installing and configuring Grunt, please see ' +
|
|
|
+ 'the Getting Started guide:' +
|
|
|
+ '\n\n' +
|
|
|
+ 'http://gruntjs.com/getting-started';
|
|
|
+
|
|
|
+
|
|
|
+exports.warnOn = '*';
|
|
|
+
|
|
|
+
|
|
|
+exports.template = function(grunt, init, done) {
|
|
|
+
|
|
|
+ init.process({type: 'amber'}, [
|
|
|
+
|
|
|
+ init.prompt('name', 'AmberApp'),
|
|
|
+ init.prompt('title'),
|
|
|
+ init.prompt('description', 'Amber Application.'),
|
|
|
+ init.prompt('version'),
|
|
|
+ init.prompt('repository'),
|
|
|
+ init.prompt('homepage'),
|
|
|
+ init.prompt('bugs'),
|
|
|
+ init.prompt('licenses', 'MIT'),
|
|
|
+ init.prompt('author_name'),
|
|
|
+ init.prompt('author_email'),
|
|
|
+ init.prompt('author_url')
|
|
|
+ ], function(err, props) {
|
|
|
+
|
|
|
+ props.amberjson = props.name + '.amber.json';
|
|
|
+ props.dependencies = {'amber': '~0.10.0'};
|
|
|
+
|
|
|
+ props.keywords = ['Amber'];
|
|
|
+
|
|
|
+
|
|
|
+ props.node_version = '>= 0.8.0';
|
|
|
+
|
|
|
+
|
|
|
+ var files = init.filesToCopy(props);
|
|
|
+
|
|
|
+
|
|
|
+ init.addLicenseFiles(files, props.licenses);
|
|
|
+
|
|
|
+
|
|
|
+ init.copyAndProcess(files, props, {noProcess: 'libs/**'});
|
|
|
+
|
|
|
+
|
|
|
+ init.writePackageJSON('package.json', props);
|
|
|
+
|
|
|
+
|
|
|
+ done();
|
|
|
+ });
|
|
|
+
|
|
|
+};
|