Created
April 22, 2018 09:18
-
-
Save abner/f6c7faa4a32e3355b8c5f2bb1eb91801 to your computer and use it in GitHub Desktop.
Angular,Jest,DockerGVIM
This file contains 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
node_modules |
This file contains 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
FROM ubuntu:17.10 | |
COPY sources.list /etc/apt/sources.list | |
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \ | |
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | |
ENV LANG en_US.utf8 | |
RUN export uid=1000 gid=1000 && \ | |
mkdir -p /home/developer && \ | |
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \ | |
echo "developer:x:${uid}:" >> /etc/group && \ | |
# echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \ | |
# chmod 0440 /etc/sudoers.d/developer && \ | |
usermod -aG sudo developer && \ | |
chown ${uid}:${gid} -R /home/developer | |
USER developer | |
ENV HOME=/home/developer | |
RUN rm -rf /var/lib/apt/lists/* | |
CMD gvim -f |
This file contains 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 mock = () => { | |
let storage = {}; | |
return { | |
getItem: key => (key in storage ? storage[key] : null), | |
setItem: (key, value) => (storage[key] = value || ''), | |
removeItem: key => delete storage[key], | |
clear: () => (storage = {}), | |
}; | |
}; | |
Object.defineProperty(window, 'localStorage', { value: mock() }); | |
Object.defineProperty(window, 'sessionStorage', { value: mock() }); | |
Object.defineProperty(window, 'getComputedStyle', { | |
value: () => ['-webkit-appearance'], | |
}); |
This file contains 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
{ | |
"jest": { | |
"preset": "jest-preset-angular", | |
"setupTestFrameworkScriptFile": "<rootDir>/setupJest.ts", | |
"globals": { | |
"ts-jest": { | |
"tsConfigFile": "tsconfig.spec.json" | |
}, | |
"__TRANSFORM_HTML__": true | |
}, | |
"transform": { | |
"^.+\\.(ts|js|html)$": "<rootDir>/node_modules/jest-preset-angular/preprocessor.js" | |
}, | |
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|js)$", | |
"moduleFileExtensions": [ | |
"ts", | |
"js", | |
"html" | |
], | |
"moduleNameMapper": { | |
"app/(.*)": "<rootDir>/src/app/$1" | |
}, | |
"transformIgnorePatterns": [ | |
"node_modules/(?!@ngrx)" | |
] | |
} | |
} |
This file contains 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
import 'jest-preset-angular'; | |
import './jestGlobalMocks'; |
This file contains 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
# deb cdrom:[Ubuntu-Budgie 17.04 _Zesty Zapus_ - Release amd64 (20170412)]/ zesty main multiverse restricted universe | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://br.archive.ubuntu.com/ubuntu/ artful main restricted | |
# deb-src http://br.archive.ubuntu.com/ubuntu/ zesty main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://br.archive.ubuntu.com/ubuntu/ artful-updates main restricted | |
# deb-src http://br.archive.ubuntu.com/ubuntu/ zesty-updates main restricted | |
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu | |
## team. Also, please note that software in universe WILL NOT receive any | |
## review or updates from the Ubuntu security team. | |
# deb http://br.archive.ubuntu.com/ubuntu/ artful universe | |
# deb-src http://br.archive.ubuntu.com/ubuntu/ zesty universe | |
# deb http://br.archive.ubuntu.com/ubuntu/ artful-updates universe | |
# deb-src http://br.archive.ubuntu.com/ubuntu/ zesty-updates universe | |
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu | |
## team, and may not be under a free licence. Please satisfy yourself as to | |
## your rights to use the software. Also, please note that software in | |
## multiverse WILL NOT receive any review or updates from the Ubuntu | |
## security team. | |
deb http://br.archive.ubuntu.com/ubuntu/ artful multiverse | |
# deb-src http://br.archive.ubuntu.com/ubuntu/ zesty multiverse | |
deb http://br.archive.ubuntu.com/ubuntu/ artful-updates multiverse | |
# deb-src http://br.archive.ubuntu.com/ubuntu/ zesty-updates multiverse | |
## N.B. software from this repository may not have been tested as | |
## extensively as that contained in the main release, although it includes | |
## newer versions of some applications which may provide useful features. | |
## Also, please note that software in backports WILL NOT receive any review | |
## or updates from the Ubuntu security team. | |
deb http://br.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse | |
# deb-src http://br.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse | |
## Uncomment the following two lines to add software from Canonical's | |
## 'partner' repository. | |
## This software is not part of Ubuntu, but is offered by Canonical and the | |
## respective vendors as a service to Ubuntu users. | |
# deb http://archive.canonical.com/ubuntu zesty partner | |
# deb-src http://archive.canonical.com/ubuntu zesty partner | |
deb http://security.ubuntu.com/ubuntu artful-security main restricted | |
# deb-src http://security.ubuntu.com/ubuntu zesty-security main restricted | |
deb http://security.ubuntu.com/ubuntu artful-security universe | |
# deb-src http://security.ubuntu.com/ubuntu zesty-security universe | |
deb http://security.ubuntu.com/ubuntu artful-security multiverse | |
# deb-src http://security.ubuntu.com/ubuntu zesty-security multiverse | |
# deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable # desabilitado na atualização para artful | |
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable | |
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable | |
## Depôt MultiSystem | |
# deb http://liveusb.info/multisystem/depot all main # desabilitado na atualização para artful | |
# deb http://download.virtualbox.org/virtualbox/debian artful non-free contrib # desabilitado na atualização para artful |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment