Skip to content
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
Merged

feat: custom directories #2748

merged 14 commits into from Feb 6, 2018

Conversation

ricardogobbosouza
Copy link
Contributor

@ricardogobbosouza 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'
  }
}

@codecov-io
Copy link

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 feat: custom pages directory feat: custom directories Feb 3, 2018
@@ -284,6 +284,9 @@ Options.defaults = {
name: 'layout',
mode: 'out-in'
},
assetsDir: 'assets',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@frizadiga
Copy link

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 Atinux merged commit 72300d3 into nuxt:dev Feb 6, 2018
@Atinux
Copy link
Member

Atinux commented Feb 6, 2018

Thank you for this PR @ricardogobbosouza

@ricardogobbosouza ricardogobbosouza deleted the config-pages-dir branch February 6, 2018 16:48
@lock
Copy link

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
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants