GithubHelp home page GithubHelp logo

xfiveco / generator-chisel Goto Github PK

View Code? Open in Web Editor NEW
272.0 14.0 38.0 6.43 MB

Chisel is a development framework for creating easy to maintain and fast WordPress websites.

Home Page: https://www.getchisel.co

License: MIT License

JavaScript 73.74% HTML 1.86% CSS 0.94% PHP 12.62% SCSS 8.50% Twig 2.34%
wordpress wordpress-development twig-templates timber front-end-development itcss javascript

generator-chisel's People

Contributors

arturkot avatar danekszy avatar grabowski-m avatar jakub300 avatar luboskmetko avatar marcinkrzeminski avatar piotr-bajer avatar thymikee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-chisel's Issues

Provide a way to move front-end src to WP theme folder

This is a followup on a discussion we had.

We agreed that, since we're staying with our current folder structure (src at project root, regardless front-end or WP project type), it would be nice to have a guide explaining briefly how developers can move all front-end source files to WP theme folder, so one could edit all src files in one place.

PNG issue (only windows?)

I've found an issue while adding pngs to a repo and pushing to gitlab.
It treats pngs like a text files and probably alters their eol.
If you add *.png binary to .gitattributes, problem is solved.

Generating WordPress project type

Generating WP project will involve things like:

  • install WordPress & Timber
  • create theme folder from name-slug
  • copy template files to the theme folder
  • copy Timber base theme files
  • remove Gulp templates task (as Twig templates are supported by Timber)
  • add custom assetPath function to Twig to load default or revisioned styles/scripts, decide when to load which one (proxy test?)
  • do not create project index when running page subgenerator
  • allow custom wp-config and other setup
  • adjust coding style to codex (tabs?)

Default screen after running `gulp`

What should I do to take a look at a default page?

After running gulp I see:

zrzut ekranu 2016-08-04 22 01 53

Meanwhile in our XH generator it looks like this:

zrzut ekranu 2016-08-04 22 05 02

I'm not sure If I should take some additional action after yo chisel?

Base our Stylelint config on external standard

Hey,

I'm in the middle of project development for client using Chisel and so far I've been running into many problems with code style.
At one point I even discovered some rules that contradict each other (requiring single quotes and enforcing double quotes on font names at the same time).
Stylelint seems to be really strict (as opposed to scss_lint which has sane defaults).
Perhaps we could consider tweaking our settings or using some external config with few overrides?
Seems like https://github.com/stylelint/stylelint-config-standard is the most popular one right now.

I'd love our linter to nugde me in the right direction, without being too dogmatic at the same time...
Is there a way to define some rules that would warn, but not err?

Curious about your feedback.

D.

Reorganize templates

Currently all templates are stored (or rather buried) in generators/app/templates. This makes them less obvious and only accessible for the main generator.

Using template context we could move all templates to the root folder so they are easier to maintain and other sub generators can use them as well.

Something like this works, though probably it could be refactored to a universal utility

'use strict';

var yeoman = require('yeoman-generator');

var test = yeoman.Base.extend({
  paths: function () {
    this.sourceRoot(this.sourceRoot() + '/../../../templates');
  },

  writing: function () {
    this.fs.copyTpl(
      this.templatePath('twig/index.twig'),
      this.destinationPath('templates/index.twig'),
      { title: 'Templating with Yeoman!' }
    );
  }
});

module.exports = test;

This way we could for example use the same Twig templates when generating front-end and WP projects with front-end.

Assets issue

There is a problem with the assets building.
Chisel reports such an error from time to time

[12:46:20] Error: ENOENT: no such file or directory, open
I need to make build for the second time or sometimes more.

Functionality plugin

Generating a functionality plugin to store site specific functionality like custom post types, taxonomies, etc.

Console output when no data file

Is this how it's supposed to work when there is no data file?

[14:27:52] Starting 'scripts-build'...
[14:27:52] Finished 'assets-watch' after 263 ms
{ Error: ENOENT: no such file or directory, open 'C:\xampp\htdocs\www\dev\fives-concept\src\data\projects.twig.json'
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\xampp\\htdocs\\www\\dev\\fives-concept\\src\\data\\projects.twig.json' }
[14:27:52] Finished 'templates-watch' after 409 ms
[14:27:52] Finished 'styles-watch' after 846 ms

Add project type question

Replace the current feature option for "WordPress support" with a question about project type. They should be like:

  • Front-end only
  • WordPress with Front-end
  • WordPress only <- this one can be added later

This setup would allow us to distinguish among more project types and scaffold the projects accordingly. For example on the WP only project type we don't have to display question about additional front-end features or generate any front-end stuff.

Twig templates base path

'base' property should be set for twigUpToDate plugin as it allows to use paths relatively to the base templates path and not to current twig files.

Original php library does not allow to use paths relative to current file (usage of .. in paths).

Not sure what's the reason for using .gitattributes

I mean specifically * text eol=lf.
This causes troubles with PNG images and popular fonts formats like woff, woff2, otf, ttf on UNIX machines.

I have never had troubles working on the repository without .gitattributes specified, regardless the OS of the collaborators.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.