Browse Source

Migration from bower to npm only

dev-master
Simon Vieille 2 years ago
parent
commit
8caff598e8
No known key found for this signature in database GPG Key ID: 919533E2B946EA10
12 changed files with 50 additions and 55 deletions
  1. +0
    -3
      .bowerrc
  2. +1
    -1
      .gitignore
  3. +14
    -21
      Makefile
  4. +20
    -7
      README.md
  5. +0
    -22
      bower.json
  6. +9
    -0
      package.json
  7. +1
    -1
      src/Gist/Resources/views/View/revisions.html.twig
  8. +1
    -0
      web/components/bootstrap
  9. +1
    -0
      web/components/diff
  10. +1
    -0
      web/components/flag-icon-css
  11. +1
    -0
      web/components/iframe-resizer
  12. +1
    -0
      web/components/jquery

+ 0
- 3
.bowerrc View File

@ -1,3 +0,0 @@
{
"directory": "web/components/"
}

+ 1
- 1
.gitignore View File

@ -5,8 +5,8 @@
/propel.yaml
/src/Gist/Model/Base/
/src/Gist/Model/Map/
/web/components/
/app/propel/
/node_modules/
/app/config/config.yml
/app/config/propel/
/data/


+ 14
- 21
Makefile View File

@ -1,5 +1,5 @@
COMPOSER ?= composer
BOWER ?= bower
NPM ?= npm
GIT ?= git
MKDIR ?= mkdir
PHP ?= php
@ -7,47 +7,40 @@ PHP ?= php
all: update
composer:
@echo "Installing application's dependencies"
@echo "-------------------------------------"
@echo
@echo "Installing PHP dependencies"
@echo "---------------------------"
@echo
$(COMPOSER) install $(COMPOSER_INSTALL_FLAGS)
bower:
@echo "Installing application's dependencies"
@echo "-------------------------------------"
@echo
npm:
@echo "Installing CSS/JS dependencies"
@echo "------------------------------"
@echo
$(BOWER) install
optimize:
@echo "Optimizing Composer's autoloader, can take some time"
@echo "----------------------------------------------------"
@echo
$(COMPOSER) dump-autoload --optimize
$(NPM) install
update:
@echo "Updating application's dependencies"
@echo "-----------------------------------"
@echo
@echo
$(GIT) pull origin master
${MKDIR} -p data/git
$(COMPOSER) update
$(BOWER) install
$(NPM) install
run:
@echo "Run development server"
@echo "----------------------"
@echo
@echo
$(PHP) -S 127.0.0.1:8080 -t web
propel:
@echo "Propel migration"
@echo "----------------"
@echo
@echo
./vendor/propel/propel/bin/propel config:convert
./vendor/propel/propel/bin/propel model:build --recursive
./vendor/propel/propel/bin/propel migration:diff --recursive


+ 20
- 7
README.md View File

@ -5,7 +5,7 @@ Table of Contents
* [Requirements](#requirements)
* [Git](#git)
* [Composer](#composer)
* [Bower](#bower)
* [NPM](#npm)
* [Installation](#installation)
* [Upgrade](#upgrade)
* [Configuration](#configuration)
@ -34,7 +34,7 @@ Requirements
* GIT
* MySQL or SQLite (PostgreSQL should works)
* Composer (php)
* Bower (node)
* NPM (nodejs)
### Git
@ -62,10 +62,9 @@ Else, follow the next instructions:
# For a global installation
$ sudo mv composer.phar /usr/local/bin/composer
### Bower
### NPM
$ sudo apt-get install npm
$ sudo npm install -g bower
Installation
------------
@ -162,12 +161,26 @@ Makefile
A Makefile is provided to automate some tasks.
* `make` will install application's dependencies via Composer and Bower,
* `make optimize` will run Composer's autoloader dump script with classmap
* `make` will install dependencies via composer and NPM
* `make composer` will install PHP dependencies via composer
* `make npm` will install CSS/JS dependencies via NPM
* `make update` will update the application
* `make propel` will generate propel's files
* `make propel` will generate propel migrations (database and files)
* `make run` will run development server on http://127.0.0.1:8080/
By default, `composer`, `npm`, `git`, `mkdir` and `php` binaries must be in your `$PATH`. You can override it by using these envars:
* `COMPOSER`
* `NPM`
* `GIT`
* `MKDIR`
* `PHP`
For example:
$ export COMPOSER=/path/to/composer
$ make composer
API
---


+ 0
- 22
bower.json View File

@ -1,22 +0,0 @@
{
"name": "gist",
"version": "0.0.3",
"authors": [
"Simon Vieille <simon@deblan.fr>"
],
"description": "GIST is an open-source application to share code.",
"main": "web/index.php",
"keywords": [
"Gist",
"GIT"
],
"license": "LGPL",
"homepage": "https://gitnet.fr/deblan/gist",
"dependencies": {
"bootstrap": "3.3.4",
"flag-icon-css": "0.7.1",
"iframe-resizer": "2.8.6",
"jsdiff": "~2.2.2",
"Prism": "~1.8.1"
}
}

+ 9
- 0
package.json View File

@ -0,0 +1,9 @@
{
"dependencies": {
"bootstrap": "^3.3.4",
"diff": "^2.2.2",
"flag-icon-css": "^0.8.6",
"iframe-resizer": "^2.8.6",
"jquery": "^1.9.1"
}
}

+ 1
- 1
src/Gist/Resources/views/View/revisions.html.twig View File

@ -82,7 +82,7 @@
<script src="{{ web_path }}app/js/prism.js" {% if gist.cipher %}data-manual{% endif %}></script>
{% if gist.cipher %}
<script src="{{ web_path }}components/jsdiff/diff.min.js"></script>
<script src="{{ web_path }}components/diff/diff.min.js"></script>
<script>
var key = getKey();


+ 1
- 0
web/components/bootstrap View File

@ -0,0 +1 @@
../../node_modules/bootstrap

+ 1
- 0
web/components/diff View File

@ -0,0 +1 @@
../../node_modules/diff

+ 1
- 0
web/components/flag-icon-css View File

@ -0,0 +1 @@
../../node_modules/flag-icon-css

+ 1
- 0
web/components/iframe-resizer View File

@ -0,0 +1 @@
../../node_modules/iframe-resizer

+ 1
- 0
web/components/jquery View File

@ -0,0 +1 @@
../../node_modules/jquery

Loading…
Cancel
Save