Whenever I encounter the
"Error: Cannot find module './core' from '/var/www/html/psychedharma/public_html/vendor'"
I typically avoid using browserify, but it seems that jquery-ui requires it (pun intended.)
If anyone could offer some assistance, it would be greatly appreciated.
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-browserify');
grunt.initConfig({
node: './node_modules',
dest: './public_html/vendor',
destfaf: './public_html/fonts',
copy: {
main: {
files: [
{
expand: true,
flatten: true,
src: ['<%= node %>/font-awesome/fonts/fontawesome-webfont.*'],
dest: '<%= destfaf %>/',
filter: 'isFile'
},
{
expand: true,
flatten: true,
src: ['<%= node %>/bootstrap/fonts/glyphicons-halflings-regular.*'],
dest: '<%= destfaf %>/',
filter: 'isFile'
}
]
}
},
concat: {
css: {
files: {
'<%= dest %>/css.css': [
'<%= node %>/bootstrap/dist/css/bootstrap.min.css',
'<%= node %>/font-awesome/css/font-awesome.min.css'
]
}
},
js: {
files: {
'<%= dest %>/js.js': [
'<%= node %>/jquery/dist/jquery.min.js',
'<%= node %>/bootstrap/dist/js/bootstrap.min.js',
'<%= node %>/less/dist/less.min.js',
'<%= node %>/jquery-ui/jquery-ui.js',
'<%= node %>/jquery-ui/sortable.js'
]
}
}
},
browserify: {
dist: {
files: {
'<%= dest %>/js.js': ['<%= dest %>/js.js']
},
// options: {
// transform: ['coffeeify']
// }
}
},
uglify: {
build: {
files: {
'<%= dest %>/js.min.js': [ '<%= dest %>/js.js' ]
}
}
}
});
grunt.registerTask('def', [
'concat',
'copy',
'browserify',
'uglify'
]);
grunt.registerTask('default', ['def']);
};