These are chat archives for brunch/brunch

11th
Sep 2016
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 10:28
hey
i cannot figure what is wrong with my config file
i get this error Uncaught Error: Cannot find module 'initialize' from '/'
this is brunch.config.js
module.exports = {
  server: {
    base: '/public',
    stripSlashes: true,
    command: 'php -S 0.0.0.0:3000 -t public'
  },
  paths: {
    watched: ['resources'],
    public: './public/build'
  },

  files: {
    javascripts: {
      joinTo: 'app.js',
    },
    stylesheets: {
      joinTo:'app.css'
    },
    templates: {joinTo: 'app.js'}        
  },  

  plugins: {
     postcss: {}
  }
};
Ryan Sobol
@ryansobol
Sep 11 2016 14:42
@cmnstmntmn when I get that error, it's because I have a syntax error in my watched JS files. Check the brunch output in the terminal
@cmnstmntmn also, I see the config is only watching the resources directory. Where is the initialize.js file located?
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 16:09
@ryansobol it's inside /resources
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 16:15
but is there a way to remove extra generated content ?
huh
can't figure it out
lost a full day, trying to load modules
Ryan Sobol
@ryansobol
Sep 11 2016 16:21
@cmnstmntmn not sure what you mean. Maybe if you could link the entire project instead of just the config
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 16:27
@ryansobol this is how my project tree looks
it's the default brunch new structure, a bit modified
app.js is loaded <script src="build/js/app.js"></script> inside index.php
all good so far, but i can't figure how to get any console.log message out of it
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 16:45
  modules: {
    wrapper: false
  }
but still the generated file lokks this way
even when i build with brunch build --production
Ryan Sobol
@ryansobol
Sep 11 2016 17:28
@cmnstmntmn the code is doing a lot of fancy plumbing. Have you got it working with the default plumbing yet?
@cmnstmntmn console.log not working makes me suspicious
Yeah, its more than 'a bit modified'
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 19:12
@ryansobol yeah
module.exports = {
  server: {
    base: '/public',
    stripSlashes: true,
    command: 'php -S 0.0.0.0:3000 -t public'
  }, 
  paths: {
    watched: ['resources'],
    public: './public/build'
  },

  modules: {
    wrapper: false,
    definition: false
  },

  npm: {
    enabled: false
  },

  files: {
    javascripts: {
      joinTo: 'js/app.js'
    },
    stylesheets: {
      joinTo:'css/app.css'
    },
    templates: {joinTo: 'js/app.js'}        
  },   

  plugins: {
     postcss: {}
  } 
};
modules, npm did the thing
Ryan Sobol
@ryansobol
Sep 11 2016 19:36
@cmnstmntmn +1
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 19:42
still Couldn't find preset "stage-0" relative to directory
i have to add presets to a .babelrc file
this way not working
  plugins: {
      babel: {presets: ['es2015', 'stage-0']}
  }
any ideea ?
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 20:00
now trying to add rollup .. 1 more day to lost with babel and it's pressets .. good god :(
Ryan Sobol
@ryansobol
Sep 11 2016 20:24
@cmnstmntmn tbh, you might want to read the docs. Most of it explained real well
Constantin Angheloiu
@cmnstmntmn
Sep 11 2016 20:25
brunch new -s es6 same error of missing stage-0
anyway i'll try tomorrow
not a good day for science