Skip to content

Commit 15ee549

Browse files
committed
update
2 parents e6b553b + 3d43b1f commit 15ee549

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"lint": "eslint src",
4444
"build": "babel src -d lib --ignore '*.test.js'",
4545
"watch": "babel --watch src -d lib --ignore '*.test.js'",
46-
"test-gen": "rm -rf ./tmp && npm run build && ./lib/index.js https://demo.api-platform.com ./tmp",
46+
"test-gen": "rm -rf ./tmp && npm run build && ./lib/index.js https://demo.api-platform.com ./tmp/react && ./lib/index.js https://demo.api-platform.com ./tmp/react-native -g react-native",
4747
"test-gen-env": "rm -rf ./tmp && npm run build && API_PLATFORM_CLIENT_GENERATOR_ENTRYPOINT=https://demo.api-platform.com API_PLATFORM_CLIENT_GENERATOR_OUTPUT=./tmp ./lib/index.js"
4848
},
4949
"bin": {

src/generators/ReactNativeCrudGenerator.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,15 @@ export default class ReactNativeCrudGenerator {
5555
console.log(chalk.green(`
5656
// import reducers
5757
import ${titleLc} from './reducers/${titleLc}/';
58+
<<<<<<< HEAD
5859
// Add the reducer
5960
combineReducers(${titleLc},{/* ... */}),
61+
=======
62+
63+
// Add the reducer
64+
combineReducers(${titleLc},{/* ... */}),
65+
66+
>>>>>>> 3d43b1f377ef84d790d6022c6f61df5301c28246
6067
`));
6168
}
6269

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ program
1212
.usage('entrypoint outputDirectory')
1313
.option('-r, --resource [resourceName]', 'Generate CRUD for the given resource')
1414
.option('-p, --hydra-prefix [hydraPrefix]', 'The hydra prefix used by the API', 'hydra:')
15+
<<<<<<< HEAD
1516
.option('-g, --generator [generator]', 'The generator to use, one of "react", "react-native", "angular", etc.', 'react')
1617
.option('-t, --template-directory [templateDirectory]', 'The templates directory base to use. Final directory will be ${templateDirectory}/${generator}', `${__dirname}/../templates/`)
18+
=======
19+
.option('-g, --generator [generator]', 'The generator to use, one of "react", "react-native" ', 'react')
20+
>>>>>>> 3d43b1f377ef84d790d6022c6f61df5301c28246
1721
.parse(process.argv);
1822

1923
if (2 !== program.args.length && (!process.env.API_PLATFORM_CLIENT_GENERATOR_ENTRYPOINT || !process.env.API_PLATFORM_CLIENT_GENERATOR_OUTPUT)) {

templates/react/utils/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Link } from 'react-router-dom';
3-
import { API_PATH } from '../api/_entrypoint';
3+
import { API_PATH } from '../../react-common/actions/api/_entrypoint';
44

55
export function itemToLinks(items) {
66
return Array.isArray(items) ? items.map(item => createLink(item)) : createLink(items);

0 commit comments

Comments
 (0)