2

そのため、yeoman init を使用してプロジェクトを作成し、requirejs を使用しています。requirejs を almondjs に置き換えて、読み込みを高速化したいと考えています。これどうやってするの?

AlmondJS はこちら: https://github.com/jrburke/almond

RequireJS はこちら: http://requirejs.org/

ヨーマン: http://yeoman.io/


Gruntfile.js での require.js の唯一の言及は次のとおりです。

// rjs configuration. You don't necessarily need to specify the typical
// `path` configuration, the rjs task will parse these values from your
// main module, using http://requirejs.org/docs/optimization.html#mainConfigFile
//
// name / out / mainConfig file should be used. You can let it blank if
// you're using usemin-handler to parse rjs config from markup (default
// setup)
rjs: {
  // no minification, is done by the min task
  optimize: 'none',
  baseUrl: './scripts',
  wrap: true,
  name: 'main'
},
4

1 に答える 1