Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
share
anue-fe-sdk
Commits
3c42191c
Commit
3c42191c
authored
4 years ago
by
oahehc
Browse files
Options
Download
Email Patches
Plain Diff
Config: adjust pipe target folder and update document
parent
069f6fd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
README.md
README.md
+27
-3
webpack.config.js
webpack.config.js
+3
-3
No files found.
README.md
View file @
3c42191c
...
...
@@ -17,9 +17,33 @@ publish a new version to npm every time you make a change.
Instead, you can directly let the packager output files to specific folder(s) by this command
```
$ yarn pipe /path/to/some/project /path/to/another/project ...
```
1.
create pipe clone the file into another project
```
$ yarn pipe /path/to/some/project /path/to/another/project ...
```
2.
in the target project, modify the path for
`anue-fe-sdk`
-
use webpack (fe-desktop, fe-mobile...)
```
js
@
webpack
config
file
resolve
:
{
alias
:
{
'
anue-fe-sdk
'
:
path
.
resolve
(
process
.
cwd
(),
'
./anue-fe-sdk
'
),
},
},
```
-
for Next.js project (fe-lobby, fe-social-rich...)
```
js
@
next
.
config
.
js
Object
.
assign
(
config
.
resolve
.
alias
,
aliases
.
reduce
(
{
'
anue-fe-sdk
'
:
path
.
resolve
(
process
.
cwd
(),
'
./anue-fe-sdk
'
),
}
)
);
```
3.
remove anue-fe-sdk folder and aliases config after finish testing
## Analyze Packages
...
...
This diff is collapsed.
Click to expand it.
webpack.config.js
View file @
3c42191c
...
...
@@ -35,9 +35,9 @@ if (externalProjectPath.length > 0) {
}
syncTimer
=
setTimeout
(()
=>
{
externalProjectPath
.
forEach
(
p
=>
{
execSync
(
`rm -rf
${
p
}
/sdk`
)
execSync
(
`cp -R
${
defaultOutputPath
}
${
p
}
/sdk`
)
execSync
(
`cp -R
${
path
.
resolve
(
__dirname
,
'
./src/defines
'
)}
${
p
}
/sdk/defines`
)
execSync
(
`rm -rf
${
p
}
/
anue-fe-
sdk`
)
execSync
(
`cp -R
${
defaultOutputPath
}
${
p
}
/
anue-fe-
sdk`
)
execSync
(
`cp -R
${
path
.
resolve
(
__dirname
,
'
./src/defines
'
)}
${
p
}
/
anue-fe-
sdk/defines`
)
console
.
log
(
chalk
`{green.bold [sync] } successfully sync output files \n{gray
${
defaultOutputPath
}
} {cyan => }
${
p
}
`
)
})
syncTimer
=
null
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment