Skip to content

Commit

Permalink
Merge pull request #159 from FoalTS/remove-bootstrap
Browse files Browse the repository at this point in the history
Remove bootstrap from @foal/cli.
  • Loading branch information
LoicPoullain authored Aug 5, 2018
2 parents 4754bfe + baecf87 commit fc0b925
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 116 deletions.
5 changes: 0 additions & 5 deletions packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"bin/"
],
"dependencies": {
"bootstrap": "^4.1.1",
"clean-webpack-plugin": "^0.1.19",
"commander": "^2.15.1",
"html-loader": "^0.5.5",
Expand Down
10 changes: 0 additions & 10 deletions packages/cli/src/generate/generators/app/create-app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { strictEqual } from 'assert';

// FoalTS
import {
readFileFromNodeModules,
readFileFromRoot,
readFileFromTemplatesSpec,
rmdirIfExists,
Expand Down Expand Up @@ -33,7 +32,6 @@ describe('createApp', () => {

// Public
rmfileIfExists('test-foo-bar/public/logo.png');
rmfileIfExists('test-foo-bar/public/bootstrap.min.css');
rmdirIfExists('test-foo-bar/public');

// Src
Expand Down Expand Up @@ -112,14 +110,6 @@ describe('createApp', () => {

});

it('should copy the bootstrap css file.', () => {

const expected = readFileFromNodeModules('bootstrap/dist/css/bootstrap.min.css');
const actual = readFileFromRoot('test-foo-bar/public/bootstrap.min.css');
strictEqual(actual, expected);

});

it('should render the src/app/controllers templates.', () => {

let expected = readFileFromTemplatesSpec('app/src/app/controllers/index.1.ts');
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/src/generate/generators/app/create-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as crypto from 'crypto';

// FoalTS
import {
copyFileFromNodeModules,
copyFileFromTemplates,
getNames,
mkdirIfNotExists,
Expand Down Expand Up @@ -64,7 +63,6 @@ export function createApp({ name, sessionSecret }:
// Public
mkdirIfNotExists(`${names.kebabName}/public`);
copyFileFromTemplates('app/public/logo.png', `${names.kebabName}/public/logo.png`);
copyFileFromNodeModules('bootstrap/dist/css/bootstrap.min.css', `${names.kebabName}/public/bootstrap.min.css`);

// Src
mkdirIfNotExists(`${names.kebabName}/src`);
Expand Down
Binary file modified packages/cli/src/generate/templates-spec/app/public/logo.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,51 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="csrf-token" content="<%= csrfToken %>">
<title><%= appName %></title>

<link rel="stylesheet" href="bootstrap.min.css">
<link rel="shortcut icon" href="logo.png">
<style>
html, body {
height: 100%
}
body {
padding-top: 54px;
padding-top: 100px;
background: linear-gradient(to bottom right, #116dd6, #bcd8f9);
text-align: center;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}
h1 {
color: white;
font-weight: bold;
margin-bottom: 40px
}
a {
color: white;
background-color: #126cda;
border-color: #126cda;
border-radius: 30px;
padding: 0.75rem 2.25rem;
text-decoration: none;
font-weight: bold;
margin: 0px 10px;
}
@media (min-width: 992px) {
body {
padding-top: 56px;
}
img{
background-color: white;
padding: 10px 40px;
border-radius: 80px;
background-color: #f1f6fc;
}
</style>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="#">Welcome to <%= appName %>!</a>
</div>
</nav>

<!-- Page Content -->
<div class="container">
<div class="row mt-5">
<div class="col-lg-12">
<img src="logo.png" alt="FoalTS logo" class="mx-auto d-block">
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center">
<h1 class="mt-3">You have successfully installed FoalTS!</h1>
<p class="lead mt-4">You'll find below some useful resources to learn more on FoalTS, a high-level Node.JS framework to quickly build web apps in TypeScript.</p>
</div>
<div>
<div class="img-container">
<img src="logo.png" alt="FoalTS logo">
</div>
<div class="row mt-4">
<div class="col-md-4">
<div class="alert alert-info text-center" role="alert">
<h4 class="alert-heading mb-0">
<a href="https://foalts.gitbooks.io/docs/">Documentation</a>
</h4>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-info text-center" role="alert">
<h4 class="alert-heading mb-0">
<a href="https://twitter.com/FoalTs">Twitter</a>
</h4>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-info text-center" role="alert">
<h4 class="alert-heading mb-0">
<a href="https://foalts.org/">FoalTS Website</a>
</h4>
</div>
</div>
<h1>You have successfully installed FoalTS!</h1>
<div>
<a href="https://foalts.gitbook.io/docs/">Documentation</a>
<a href="https://twitter.com/FoalTs">Twitter</a>
<a href="https://foalts.org/">FoalTS Website</a>
</div>
</div>

</body>
</html>
Binary file modified packages/cli/src/generate/templates/app/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,51 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="csrf-token" content="<%= csrfToken %>">
<title><%= appName %></title>

<link rel="stylesheet" href="bootstrap.min.css">
<link rel="shortcut icon" href="logo.png">
<style>
html, body {
height: 100%
}
body {
padding-top: 54px;
padding-top: 100px;
background: linear-gradient(to bottom right, #116dd6, #bcd8f9);
text-align: center;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}
h1 {
color: white;
font-weight: bold;
margin-bottom: 40px
}
a {
color: white;
background-color: #126cda;
border-color: #126cda;
border-radius: 30px;
padding: 0.75rem 2.25rem;
text-decoration: none;
font-weight: bold;
margin: 0px 10px;
}
@media (min-width: 992px) {
body {
padding-top: 56px;
}
img{
background-color: white;
padding: 10px 40px;
border-radius: 80px;
background-color: #f1f6fc;
}
</style>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="#">Welcome to <%= appName %>!</a>
</div>
</nav>

<!-- Page Content -->
<div class="container">
<div class="row mt-5">
<div class="col-lg-12">
<img src="logo.png" alt="FoalTS logo" class="mx-auto d-block">
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center">
<h1 class="mt-3">You have successfully installed FoalTS!</h1>
<p class="lead mt-4">You'll find below some useful resources to learn more on FoalTS, a high-level Node.JS framework to quickly build web apps in TypeScript.</p>
</div>
<div>
<div class="img-container">
<img src="logo.png" alt="FoalTS logo">
</div>
<div class="row mt-4">
<div class="col-md-4">
<div class="alert alert-info text-center" role="alert">
<h4 class="alert-heading mb-0">
<a href="https://foalts.gitbooks.io/docs/">Documentation</a>
</h4>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-info text-center" role="alert">
<h4 class="alert-heading mb-0">
<a href="https://twitter.com/FoalTs">Twitter</a>
</h4>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-info text-center" role="alert">
<h4 class="alert-heading mb-0">
<a href="https://foalts.org/">FoalTS Website</a>
</h4>
</div>
</div>
<h1>You have successfully installed FoalTS!</h1>
<div>
<a href="https://foalts.gitbook.io/docs/">Documentation</a>
<a href="https://twitter.com/FoalTs">Twitter</a>
<a href="https://foalts.org/">FoalTS Website</a>
</div>
</div>

</body>
</html>

0 comments on commit fc0b925

Please sign in to comment.