mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
7060141247
- [ReactNative] Move merge & mergeInto from downstream to vendor | Christopher Chedeau - [ReactNative] Replace all the call sites of mergeInto by Object.assign | Christopher Chedeau - [WIP] Migrated View Managers over to new architecture | Nick Lockwood - [ReactNative] Replace all the call sites of copyProperties by Object.assign | Christopher Chedeau - [ReactNative] Migrate navigator.geolocation to open source | Christopher Chedeau - [ReactNative] Remove README.md, LICENSE and .travis.yml from fbobjc | Christopher Chedeau - [react-packager] Better transform errors | Amjad Masad - [React Native][react-packager] Fix test runner and fialing tests | Amjad Masad
26 lines
584 B
JavaScript
26 lines
584 B
JavaScript
'use strict';
|
|
|
|
var transformer = require('../packager/transformer.js');
|
|
|
|
function transformSource(src, filename) {
|
|
return transformer.transform(src, filename).code;
|
|
}
|
|
|
|
module.exports = {
|
|
transformSource: transformSource,
|
|
|
|
process: function(src, fileName) {
|
|
if (fileName.match(/node_modules/)) {
|
|
return src;
|
|
}
|
|
|
|
try {
|
|
return transformSource(src, fileName);
|
|
} catch(e) {
|
|
throw new Error('\nError transforming file:\n js/' +
|
|
(fileName.split('/js/')[1] || fileName) + ':' + e.lineNumber + ': \'' +
|
|
e.message + '\'\n');
|
|
}
|
|
}
|
|
};
|