Giter Club home page Giter Club logo

metalsmith-base's People

Contributors

jboulhous avatar patrickheeney avatar thangngoc89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

metalsmith-base's Issues

Use relative paths?

I would like to host my site in a subfolder (for example Github Pages: http://username.github.io/project/), where this absolute syntax would not work:

How can I make it work with root on localhost but append "project" (in this case) on remote?

Thanks!

Khaos Scaffolding

Moving over to Khaos will make scaffolding new projects using metalsmith-base extremely easy.

Live reload?

Thank you for a great starter kit. How would I add live reload to it? Thanks!

webpackJsonp is not defined

Thank you for a great starter kit.

But when i run it, there is an error in app.js

app.js:1 Uncaught ReferenceError: webpackJsonp is not defined

webpackJsonp([0],[
/* 0 /
/
**/ function(module, exports, webpack_require) {
...

Please tell me how to fix it. Thank you.

Webpack error

After doing npm install then running npm run start:

[22:08:57] Using gulpfile e:\git\metalsmith\metalsmith-base\gulpfile.js [22:08:57] Starting 'vendor'... [22:08:57] Starting 'webpack'... [22:08:57] Starting 'styles'... [22:08:57] Starting 'metalsmith'... [22:08:58] Finished 'vendor' after 1.05 s [22:09:01] Finished 'styles' after 3.65 s [22:09:01] Finished 'webpack' after 3.94 s [22:09:01] Starting 'scripts'... [22:09:01] Finished 'scripts' after 8.37 μs [22:09:01] Finished 'metalsmith' after 3.98 s [22:09:01] Starting 'default'... [22:09:01] Finished 'default' after 13 μs [22:09:01] Starting 'watch'... [22:09:01] Finished 'watch' after 48 ms [22:09:01] Starting 'server'... Server: http://localhost:3507 [22:09:01] Finished 'server' after 159 ms

Then opening the url in chrome I get the following error in the console:

app.js:1 Uncaught ReferenceError: webpackJsonp is not defined


Windows 7
Git Bash
Google Chrome

webpack?

Why the webpack dependency in package.json? It doesn't appear to be used. Or, am I missing something?

how to add the bootstrap.min.js which in node_modules/bootstrap/dist/js/...

I have saw the question No.5(#5) Proper way to include JS and CSS libs?

But i also don't know how to do that...
Can you give a more detailed example for "how to add the bootstrap.min.js" ...

gulp.task('webpack', function(callback) {
var webpackPlugins = [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
}),
new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'),
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify(args.production ? 'production' : 'development'),
},
})
];

if (args.production) {
webpackPlugins.push(new webpack.optimize.UglifyJsPlugin({minimize: true}));
}

var webpackConfig = {
context: path.join(__dirname, site.metalsmith.config.scriptRoot),
entry: {
app: './app',
vendor: ['jquery']
},
output: {
path: path.join(__dirname, site.metalsmith.config.assetRoot, 'assets'),
filename: '[name].js'
},
resolveLoader: {
root: path.join(__dirname, 'node_modules'),
},
module: {
loaders: [
{
test: /.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel?optional[]=runtime&stage=0'
}
]
},
plugins: webpackPlugins
};

Async loading of js files in default layout is causing error

When using code splitting, the app.js file depends on the vendor.js file. Loading them asynchronously doesn't guarantee that vendor.js is loaded before app.js, which causes a webpackJsonp is not defined error.

The easy solution is to just remove the async tag, but maybe there's a way to asynchronously load both of them synchronously "on a different thread" or something. I kind of doubt it as this is just an html template, but yeah.

Before:

<!-- layouts/partials/default.html -->
<script src="/assets/vendor.js" async></script>
<script src="/assets/app.js" async></script>

After:

<!-- layouts/partials/default.html -->
<script src="/assets/vendor.js" ></script>
<script src="/assets/app.js" ></script>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.