123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- 'use strict';
- exports.description = 'Create a web application based on Amber Smalltalk.';
- exports.notes = ' _Project title_ should be a human-readable title.';
- exports.after = 'You should now install project dependencies with _bower install_.' +
- ' Afterwards, start the development server with _./bower_components/amber/bin/amber serve_.' +
- ' Your application is then accessible via _http://localhost:4000/_';
- exports.warnOn = '*';
- exports.template = function(grunt, init, done) {
- init.process({type: 'amber'}, [
-
- init.prompt('name', 'AmberApplication'),
- init.prompt('title'),
- init.prompt('description', 'Amber Application.'),
- {
- name: 'namespace',
- message: 'The namespace used to store your Amber Packages.',
- },
- {
- name: 'amber_version',
- default: '0.12.0',
- message: 'The version of Amber to use. Must be >= 0.12.0',
- },
- 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', 'Smalltalk'];
-
- props.node_version = '>= 0.8.0';
-
- var files = init.filesToCopy(props);
-
- init.addLicenseFiles(files, props.licenses);
-
- init.copyAndProcess(files, props, {noProcess: 'libs/**'});
-
-
-
- grunt.file.write('bower.json', JSON.stringify({
- "name": props.name,
- "description": props.description,
- "version": props.version,
- "authors": [
- {
- "name": props.author_name,
- "email": props.author_email
- }
- ],
- "homepage": props.homepage,
- "main": props.main,
- "keywords": props.keywords,
- "license": props.licenses,
- "private": false,
- "dependencies": {
- "amber": "~" + props.amber_version
- }
- }, null, 4));
-
- done();
- });
- };
|