-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 in LFOR/fhirpath.js from webbpack-fs-problem to…
… master * commit '239cb08ea65c55bf7659584f8b174b2a03b645ca': Refactoring Fixes the problem with 'fs' during the webpack build
- Loading branch information
Showing
10 changed files
with
74 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = function (grunt) { | ||
// Load grunt tasks automatically, when needed | ||
require('jit-grunt')(grunt, { | ||
replace: 'grunt-text-replace' | ||
}); | ||
|
||
// Define the configuration for all the tasks | ||
grunt.initConfig({ | ||
|
||
replace: { | ||
'antlr4-index': { | ||
src: ['src/parser/generated/*.js'], | ||
overwrite: true, | ||
replacements: [{ | ||
from: /'antlr4\/index'/g, | ||
to: "'../antlr4-index'" | ||
}] | ||
} | ||
} | ||
|
||
}); | ||
|
||
grunt.registerTask('updateParserRequirements', [ | ||
'replace:antlr4-index' | ||
]); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// This is a modified version of antr4's index.js, in which | ||
// the "require" statements of two unused classes are commented out | ||
// to avoid introducing a dependency on Node.js' "fs" package. | ||
|
||
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. | ||
* Use of this file is governed by the BSD 3-clause license that | ||
* can be found in the LICENSE.txt file in the project root. | ||
*/ | ||
exports.atn = require('antlr4/atn/index'); | ||
exports.codepointat = require('antlr4/polyfills/codepointat'); | ||
exports.dfa = require('antlr4/dfa/index'); | ||
exports.fromcodepoint = require('antlr4/polyfills/fromcodepoint'); | ||
exports.tree = require('antlr4/tree/index'); | ||
exports.error = require('antlr4/error/index'); | ||
exports.Token = require('antlr4/Token').Token; | ||
// Commented out to avoid the problem with 'fs' during the webpack build | ||
// exports.CharStreams = require('antlr4/CharStreams').CharStreams; | ||
exports.CommonToken = require('antlr4/Token').CommonToken; | ||
exports.InputStream = require('antlr4/InputStream').InputStream; | ||
// Commented out to avoid the problem with 'fs' during the webpack build | ||
// exports.FileStream = require('antlr4/FileStream').FileStream; | ||
exports.CommonTokenStream = require('antlr4/CommonTokenStream').CommonTokenStream; | ||
exports.Lexer = require('antlr4/Lexer').Lexer; | ||
exports.Parser = require('antlr4/Parser').Parser; | ||
var pc = require('antlr4/PredictionContext'); | ||
exports.PredictionContextCache = pc.PredictionContextCache; | ||
exports.ParserRuleContext = require('antlr4/ParserRuleContext').ParserRuleContext; | ||
exports.Interval = require('antlr4/IntervalSet').Interval; | ||
exports.Utils = require('antlr4/Utils'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters