1.4.2 • Published 10 years ago

head-require v1.4.2

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

HeadRequire.js

Extension for head.js to use resource loader like require.js

Feature

  • Set main.js in script element's data-main attribute
  • Multiple main.js available now
  • Use head.require() to load resources
  • Grunt task to compile them to a file

Basic Usage

Resource Loader

<script src="scripts/head.js"></script>
<script src="scripts/head-require.js" data-main="scripts/main.js"></script>

"scripts/main.js" like this :

head.require(
	"the/path/to/foojs",
	"the/path/to/bar.js",
	"the/path/to/baz.js"
	"the/path/to/initialize.js"
);

» Learn more about head-require.js

Grunt Task to Compile

Example :

grunt.initConfig({
	headRequire : {
		dist : {
			options : {},
			files : { "the/path/to/dest.js" : "the/path/to/main.js" }
		}
	}
});

» Learn more about Grunt task

CHANGE LOG

» Change Log


Author

mach3

1.4.2

10 years ago

1.4.1

11 years ago

1.4.0

11 years ago

1.3.0

11 years ago

1.2.1

11 years ago

1.2.0

11 years ago

1.1.0

11 years ago

1.0.0

11 years ago