Skip to content

Instantly share code, notes, and snippets.

View javaeeeee's full-sized avatar

Dmitry Noranovich javaeeeee

View GitHub Profile
@javaeeeee
javaeeeee / simpleTest.spec.js
Created January 13, 2017 21:40
A simple Jasmine test
describe('Fun with numbers', function () {
it('should return 4', function () {
expect(2 + 2).toEqual(4);
});
it('should return 0', function () {
expect(4 - 4).toEqual(0);
});
@javaeeeee
javaeeeee / app.module.js
Created December 24, 2016 15:47
AngularJS module and controller
(function () {
angular.module('app', [])
.controller('HelloController', HelloController);
HelloController.$inject = ['$scope'];
function HelloController($scope) {
$scope.myModel = 'World';
}
@javaeeeee
javaeeeee / index.html
Created December 24, 2016 15:46
index.html file for local development
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello World AngularJS application</title>
</head>
<body ng-app='app'>
<h1>Hello World AngularJS application</h1>
@javaeeeee
javaeeeee / launch.json
Last active December 24, 2016 15:18
launch.json file that starts lite-server and opens AngularJS application in a Chrome tab
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost, with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
@javaeeeee
javaeeeee / .eslintrc.js
Created December 24, 2016 13:28
.eslintrc.js file to configure ESLint to work with AngularJS
module.exports = {
"extends": ["angular", "eslint:recommended"],
};
@javaeeeee
javaeeeee / jsconfig.json
Created December 24, 2016 13:23
The simplest version of jsconfig.json file which informs VS Code that we work with JavaScript project
{
"compilerOptions": {
"target": "ES5"
},
"exclude": [
"node_modules"
]
}
@javaeeeee
javaeeeee / tasks.json
Created December 24, 2016 12:50
VS Code tasks.json file which allows to run npm start command
{
"version": "0.1.0",
"command": "npm",
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName":"startServer",
"args": [
@javaeeeee
javaeeeee / package.json
Created December 24, 2016 12:42
Package.json file with a start script
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node_modules/.bin/lite-server"
},
"keywords": [],
@javaeeeee
javaeeeee / package.json
Created December 24, 2016 12:37
package.json file with added dependencies section
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
@javaeeeee
javaeeeee / package.json
Created December 24, 2016 12:32
Package.json file generated by the npm init -y command
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",