Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.0-alpha.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Feb 14, 2020
2 parents ec87ef8 + dde37c4 commit eaeb66f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/create-nuxt-project",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.2",
"description": "A generator to kickstart your Nuxt project in a few seconds! ⚡",
"bin": "cli.js",
"files": [
Expand Down
26 changes: 19 additions & 7 deletions saofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,22 @@ module.exports = {
message: 'Project repository',
default: ({ name, hub }) => `${hub}/${name}.git`,
},
{
name: 'features',
message: 'Choose features to add',
type: 'checkbox',
choices: [{ name: 'i18n', value: 'i18n' }],
default: [],
},
],
templateData() {
const { features } = this.answers;
const i18n = features.includes('i18n');

return {
i18n,
};
},
actions() {
const actions = [
{
Expand Down Expand Up @@ -97,17 +112,14 @@ module.exports = {
console.log();
console.log(chalk`${tab}{bold To get started:}\n`);

let step = 1;

if (isNewFolder) {
console.log(chalk`${tab}${step}. Go in your project's directory`);
console.log(chalk`${tab}Go in your project's directory`);
console.log(chalk`${tab}{cyan cd ${relativeOutFolder}}\n`);

step += 1;
}
console.log(chalk`${tab}${step}. Create your .env file and fill it`);

console.log(chalk`${tab}Create your .env file and fill it`);
console.log(chalk`${tab}{cyan cp .env.example .env}\n`);
console.log(chalk`${tab}${step + 1}. Start the development server`);
console.log(chalk`${tab}Start the development server`);
console.log(chalk`${tab}{cyan npm run dev}\n`);
console.log(chalk`${tab}🎊 {bold Happy coding!}\n`);
},
Expand Down
3 changes: 3 additions & 0 deletions template/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/dotenv": "^1.4.0",
"@nuxtjs/pwa": "^3.0.0-0",
<%_ if (i18n) { _%>
"nuxt-i18n": "^6.5.0",
<%_ } _%>
"nuxt": "^2.0.0",
"vue": "^2.6.11"
},
Expand Down
11 changes: 11 additions & 0 deletions template/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export default {
'@nuxtjs/pwa',
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv',
<%_ if (i18n) { _%>
// Doc: https://nuxt-community.github.io/nuxt-i18n/
'nuxt-i18n',
<%_ } _%>
],
/*
** Axios module configuration
Expand All @@ -72,6 +76,13 @@ export default {
* @see https://github.com/Developmint/nuxt-purgecss#options
*/
purgeCSS: {},
<%_ if (i18n) { _%>
/**
* i18n module configuration
* @see https://nuxt-community.github.io/nuxt-i18n/options-reference.html
*/
i18n: {},
<%_ } _%>
/*
** Build configuration
*/
Expand Down

0 comments on commit eaeb66f

Please sign in to comment.