-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext.js
More file actions
29 lines (23 loc) · 848 Bytes
/
text.js
File metadata and controls
29 lines (23 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Copyright 2020 Erik Isaksson
* Released under MIT license, https://github.com/erikis/require-babel/blob/master/LICENSE
*/
/*global define */
define(['module', 'require-babel'], function (module, babel) {
'use strict';
var pluginConfig = module.config ? module.config() : {};
pluginConfig.extension = pluginConfig.extension || '.txt';
pluginConfig.extensions = pluginConfig.extensions || {};
pluginConfig.transform = function (text) {
return text;
};
return {
version: babel.version,
write: function (pluginName, name, write) {
return babel.write.call(babel, pluginName, name, write);
},
load: function (name, parentRequire, load, config) {
return babel.load.call(babel, name, parentRequire, load, config, pluginConfig);
}
};
});