Comments (2)
Sorry, but I'm not able to reproduce this warning. I tried both Windows and Linux (Docker container running the image node:4.2
) and ran grunt test
, but no warnings about a symbol not being defined.
Any tips on how I can reproduce this? I don't own a mac.
from grunt-include-source.
Hi, I am facing the same issue, I am also on mac.
The problem is in the "extendr" class. When I commented/disabled, things worked correctly.
I managed to make it work by changing the file to the following:
options.target = this.target;
grunt.log.debug('Ahhatem: before adding the type mapping');
//var typeMappings = extendr.clone(defaultTypeMappings);
var typeMappings = defaultTypeMappings;
grunt.log.debug('Ahhatem: after adding the type mapping');
//extendr.extend(typeMappings, options.typeMappings);
//extendr.extend(typeMappings, options.typeMappings);
grunt.log.debug('Ahhatem: after extending the type mapping');
grunt.log.debug('Base path is "' + options.basePath + '".');
// Iterate over all specified file groups.
this.files.forEach(function(file) {
grunt.log.debug('Handling output file "' + file.dest + "'...");
// Concatenate the source files.
var contents = '';
var contentSources = file.src.filter(function(filePath) {
grunt.log.debug('Using input file "' + filePath + '".');
// Remove nonexistent files.
if (!grunt.file.exists(filePath)) {
grunt.log.warn('Source file "' + filePath + '" not found.');
return false;
} else {
return true;
}
}).map( function(filePath) {
// Read and return the file's source.
return grunt.file.read(filePath);
});
// Don't bother detecting newline if we have no more than 1 file.
if (contentSources.length > 1) {
// Detect the newline to use for the content files.
// Use the first file to detect the newlines, no use to test all of them.
var contentNewline = /\r\n/g.test(contentSources[0]) ? '\r\n' : '\n';
// Join the content files as one to be processed.
contents = contentSources.join(contentNewline);
}
else {
// Still use join here, since 'contentSources' could have a length of 0?
contents = contentSources.join();
}
// Parse the contents, using a parser based on the target file.
var fileType = path.extname(file.dest).substr(1);
grunt.log.debug('File type is "' + fileType + '"');
// Try and map the file type, using it instead.
var mappedFileType = typeMappings[fileType];
if (mappedFileType) {
grunt.log.debug('File type "' + fileType + '" maps to "' + mappedFileType + '"');
fileType = mappedFileType;
}
var parserFn = parsers[fileType];
var findEndMarker = endMarkerParsers[fileType];
if (!parserFn) {
grunt.log.error('No parser found found file type "' + fileType + '".');
return false;
}
// Get the available templates.
var localTemplates = templates;
//extendr.safeDeepExtendPlainObjects(localTemplates, options.templates);
var typeTemplates = localTemplates[fileType];
from grunt-include-source.
Related Issues (20)
- Same source and destination file. HOT 3
- type="text/javascript" is redundant HOT 2
- Grunt's <%= %> feature is not supported HOT 2
- Line break issue in Windows with wiredep HOT 4
- Ordering doesn't work HOT 2
- Stip of the last <include> block header when writing deps to the same file HOT 6
- why not include sources??? HOT 1
- Include sources in the same file HOT 2
- Includes duplicate JS files HOT 7
- Please support TypeScript template HOT 1
- How to include source maps (.map extension not supported)? HOT 1
- Include sources in js files HOT 3
- [Question] Targets, could be a folder and not a file HOT 1
- Overwrite not working
- Exclude paths HOT 1
- Fails to include all files in <%= myFileList.js %> HOT 1
- TO DELETE
- script tag not included in html
- Adding support for JSP files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-include-source.