1
- FROM node:current
1
+ # Lock to node 12 because the codebase throws hundreds of `Warning: Accessing non-existent property` warnings in node 14
2
+ FROM node:12
2
3
ENV CI=true
3
4
ENV TF_BUILD=true
4
- RUN npm install -g yarn lerna --force
5
+ # Download repo version, sets up better layer caching for the following clone
6
+ ADD https://api.github.com/repos/OfficeDev/office-ui-fabric-react/git/ref/heads/master version.json
5
7
RUN git clone https://github.com/OfficeDev/office-ui-fabric-react.git /office-ui-fabric-react
6
8
WORKDIR /office-ui-fabric-react
7
9
RUN git pull
10
+ WORKDIR /
8
11
COPY --from=typescript/typescript /typescript/typescript-*.tgz typescript.tgz
9
- # Sync up all TS versions used internally to the new one
10
- WORKDIR /office-ui-fabric-react/scripts
11
- RUN yarn add typescript@../typescript.tgz --exact --dev --ignore-scripts
12
- WORKDIR /office-ui-fabric-react/packages/tsx-editor
13
- RUN yarn add typescript@../../typescript.tgz --exact --ignore-scripts
14
- WORKDIR /office-ui-fabric-react/packages/migration
15
- RUN yarn add typescript@../../typescript.tgz --exact --ignore-scripts
16
- WORKDIR /office-ui-fabric-react/apps/vr-tests
17
- RUN yarn add typescript@../../typescript.tgz --exact --ignore-scripts
18
- WORKDIR /office-ui-fabric-react/apps/todo-app
19
- RUN yarn add typescript@../../typescript.tgz --exact --ignore-scripts
20
12
WORKDIR /office-ui-fabric-react
21
- RUN yarn
22
- ENTRYPOINT [ "lerna" ]
23
- CMD [ "run" , "build" , "--stream" , "--concurrency" , "1" , "--loglevel" , "error" , "--" , "--production" , "--lint" , "--silent" ]
13
+ # Sync up all TS versions used internally to the new one (we use `npm` because `yarn` chokes on tarballs installed
14
+ # into multiple places in a workspace in a short timeframe (some kind of data race))
15
+ RUN npx lerna exec --stream --concurrency 1 -- npm install /typescript.tgz --exact --ignore-scripts
16
+ RUN npx yarn
17
+ # Perform scss task to generate scss code if present
18
+ RUN npx lerna exec --stream --concurrency 1 --bail=false -- yarn run just scss
19
+ ENTRYPOINT [ "npx" ]
20
+ CMD [ "lerna" , "exec" , "--stream" , "--concurrency" , "1" , "--loglevel" , "error" , "--bail=false" , "--" , "yarn" , "run" , "just" , "ts" ]
0 commit comments