Skip to content

Commit 73f5da4

Browse files
author
Kevin Nadro
committed
modules??
1 parent f1bf5f5 commit 73f5da4

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

js/create/index.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
var sandbox = require('./sb');
4+
5+
const CAT = () => {
6+
console.log("DOG");
7+
};
8+
9+
10+
module.exports = {
11+
CAT
12+
}

js/create/sb.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
const PRINT = () => {
4+
console.log("hiya");
5+
};
6+
7+
module.exports = {
8+
PRINT
9+
};

js/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const app = require('./app');
55
const AppConstructor = require('./app/constructor');
66
const DOM = require('./dom');
77
const Server = require('./server');
8-
8+
const Sandbox= require('./create');
99
const modules = require('./module');
1010

1111
const {
@@ -40,6 +40,7 @@ $(() => {
4040

4141
// load modules to the global scope so they can be evaled
4242
extend(true, window, modules);
43+
extend(true, window, Sandbox);
4344

4445
Server.loadCategories().then((data) => {
4546
app.setCategories(data);

js/module/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ const {
77
extend
88
} = $;
99

10-
module.exports = extend(true, {}, tracers, datas);
10+
module.exports = extend(true, {}, tracers, datas);

0 commit comments

Comments
 (0)