Skip to content

Commit 2911a66

Browse files
author
Nick Balestra
committed
flavors wip
1 parent 6d9ce48 commit 2911a66

File tree

4 files changed

+50
-52
lines changed

4 files changed

+50
-52
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const dependencies = {
2+
basics: [
3+
'@cycle/dom@17.1.0'
4+
],
5+
language: {
6+
'javascript': [],
7+
'typescript': []
8+
},
9+
streamLib: {
10+
xstream: [
11+
'@cycle/run@3.1.0',
12+
'xstream@10.5.0'
13+
],
14+
rxjs: [
15+
'@cycle/rxjs-run@7.0.0',
16+
'rxjs@5.3.0'
17+
],
18+
most: [
19+
'@cycle/most-run@7.1.0',
20+
'most@1.2.2'
21+
]
22+
}
23+
}
24+
25+
const replacements = {
26+
xstream: {
27+
run: '@cycle/run',
28+
import: 'import xs from \'xstream\'',
29+
stream: 'xs'
30+
},
31+
rxjs: {
32+
run: '@cycle/rxjs-run',
33+
import: 'import Rx from \'rxjs/Rx\'',
34+
stream: 'Rx.Observable'
35+
},
36+
most: {
37+
run: '@cycle/most-run',
38+
import: 'import * as most from \'most\'',
39+
stream: 'most'
40+
}
41+
}
42+
43+
module.exports = {
44+
dependencies,
45+
replacements
46+
}

packages/cycle-scripts/scripts/index.ejs

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/cycle-scripts/scripts/init.js

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,11 @@ const fs = require('fs-extra')
44
const path = require('path')
55
const chalk = require('chalk')
66
const spawn = require('cross-spawn')
7-
const initQuestions = require('./initQuestions')
7+
const initQuestions = require('./utils/initQuestions')
88
// Ask the user for which language and which stream library he want to use
9-
const dependencies = {
10-
basics: [
11-
'@cycle/dom@17.1.0'
12-
],
13-
language: {
14-
'JavaScript': [],
15-
'TypeScript': []
16-
},
17-
streamLib: {
18-
xstream: [
19-
'@cycle/run@3.1.0',
20-
'xstream@10.5.0'
21-
],
22-
rxjs: [
23-
'@cycle/rxjs-run@7.0.0',
24-
'rxjs@5.3.0'
25-
],
26-
most: [
27-
'@cycle/most-run@7.1.0',
28-
'most@1.2.2'
29-
]
30-
}
31-
}
32-
33-
const replacements = {
34-
xstream: {
35-
run: '@cycle/run',
36-
import: 'import xs from \'xstream\'',
37-
stream: 'xs'
38-
},
39-
rxjs: {
40-
run: '@cycle/rxjs-run',
41-
import: 'import Rx from \'rxjs/Rx\'',
42-
stream: 'Rx.Observable'
43-
},
44-
most: {
45-
run: '@cycle/most-run',
46-
import: 'import * as most from \'most\'',
47-
stream: 'most'
48-
}
49-
}
9+
const flavors = require('../configs/flavors')
10+
const dependencies = flavors.dependencies
11+
const replacements = flavors.replacements
5012

5113
// function patchGitignore (appPath) {
5214
// // Rename gitignore after the fact to prevent npm from renaming it to .npmignore
File renamed without changes.

0 commit comments

Comments
 (0)