New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom directories #2748

Merged
merged 14 commits into from Feb 6, 2018

Conversation

Projects
None yet
5 participants
@ricardogobbosouza
Contributor

ricardogobbosouza commented Feb 2, 2018

Feature custom directories in nuxt.config.js.

module.exports = {
  dir: {
    assets: 'custom-assets-dir', // Default: 'assets'
    layouts: 'custom-layouts-dir', // Default: 'layouts'
    middleware: 'custom-middleware-dir', // Default: 'middleware'
    pages: 'custom-pages-dir', // Default: 'pages'
    static: 'custom-static-dir', // Default: 'static'
    store: 'custom-store-dir' // Default: 'store'
  }
}

ricardogobbosouza added some commits Feb 2, 2018

@codecov-io

This comment has been minimized.

codecov-io commented Feb 2, 2018

Codecov Report

Merging #2748 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #2748      +/-   ##
==========================================
+ Coverage   99.91%   99.91%   +<.01%     
==========================================
  Files          23       23              
  Lines        1227     1233       +6     
==========================================
+ Hits         1226     1232       +6     
  Misses          1        1
Impacted Files Coverage Δ
lib/core/renderer.js 100% <ø> (ø) ⬆️
lib/common/options.js 100% <100%> (ø) ⬆️
lib/common/utils.js 100% <100%> (ø) ⬆️
lib/builder/webpack/base.config.js 100% <100%> (ø) ⬆️
lib/builder/builder.js 100% <100%> (ø) ⬆️
lib/builder/webpack/style-loader.js 100% <100%> (ø) ⬆️
lib/builder/generator.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c415a67...a6200a2. Read the comment docs.

@ricardogobbosouza ricardogobbosouza changed the title from feat: custom pages directory to feat: custom directories Feb 3, 2018

@@ -284,6 +284,9 @@ Options.defaults = {
name: 'layout',
mode: 'out-in'
},
assetsDir: 'assets',

This comment has been minimized.

@pi0

pi0 Feb 3, 2018

Member

If it is going to be be a best practice, i think we may move all of this options to a new dir block:

dir: {
  assets: ...
}

This comment has been minimized.

@ricardogobbosouza

ricardogobbosouza Feb 3, 2018

Contributor

Yes, you're right, I'm moving.

@frizadiga

This comment has been minimized.

frizadiga commented Feb 4, 2018

I think its a good idea to give developer flexibility to changed dir name or path such as layouts, static, store, pages in the nuxt.config.js, hope this PR will be merged as soon as possible.

Atinux and others added some commits Feb 5, 2018

@Atinux Atinux merged commit 72300d3 into nuxt:dev Feb 6, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk No dependency changes
Details
@Atinux

This comment has been minimized.

Member

Atinux commented Feb 6, 2018

Thank you for this PR @ricardogobbosouza

@ricardogobbosouza ricardogobbosouza deleted the ricardogobbosouza:config-pages-dir branch Feb 6, 2018

@manniL manniL referenced this pull request Oct 16, 2018

Open

Custom directory names #870

@lock

This comment has been minimized.

lock bot commented Nov 1, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 1, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.