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 14 commits into from Feb 6, 2018


None yet
5 participants

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


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 Feb 3, 2018


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 Feb 3, 2018


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


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
continuous-integration/travis-ci/pr The Travis CI build passed
security/snyk No dependency changes

This comment has been minimized.


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


Custom directory names #870


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.