#!/usr/bin/env
MAIN_PKG=@mycompany/mypackageA
# With lerna include-filtered-dependencies the output included the main package dependencies and the main package it self.
# We want to remove the main packgae to build only the dependencies.
SCOPES_LIST=$(lerna list --json --scope $MAIN_PKG --include-filtered-dependencies | jq '[map(select(.name!="$MAIN_PKG")) | .[] | "--scope " + .name] | reduce .[] as $item (""; . + $item + " ")')
lerna run build $SCOPES_LIST
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin flexbox( $display: flex, $direction: row, $wrap: wrap, $justify: start, $items: start, $content: start ) { | |
| // <display> - flex | inline-flex | |
| // <direction> - row | row-reverse | column | column-reverse | |
| // <wrap> - wrap | nowrap | wrap-reverse | |
| // <justify> - start | end | center | space-between | space-around | |
| // <items> - start | end | center | baseline | stretch | |
| // <content> - start | end | center | space-between | space-around | stretch | |
| // @include flexbox( flex, row, wrap, start, start, start ); | |
| // @include flexbox( inline-flex, column, nowrap, center, start, stretch ); |
FROM node:12.7.0-alpine as node
RUN mkdir -p /usr/src/repo
ADD lerna.json /usr/src/repo/
ADD package.json \
yarn.lock \
.yarnrc \
/usr/src/repo/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const actions = ()=>{ | |
| const functionA = ()=>{/*do sth*/} | |
| const functionB = ()=>{/*do sth*/} | |
| const functionC = ()=>{/*send log*/} | |
| return new Map([ | |
| [/^guest_[1-4]$/,functionA], | |
| [/^guest_5$/,functionB], | |
| [/^guest_.*$/,functionC], | |
| //... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const moviesApp = angular.module('movies', []); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AuthService { | |
| static $inject = ['$http']; | |
| private token: string; | |
| constructor($http: IHttpService) {} | |
| getToken() { | |
| if (_.isNil(this.token)) { | |
| this.token = $http.get('my-site.example.com/auth'); |
OlderNewer