Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Conversation

kentcdodds
Copy link
Member

We now have templateless builds. Getting ready to add tests.

What do you think of this @Astrism? Feel free to pull and play around. But here are the major changes (I should have added them to the changelog):

  • Moved all demo-only related files to a demo folder and added a symbolic link to src so when it's deployed the src goes with it.
  • Separated out the src folder into three sub folders: common, bootstrap, and vanilla. The build takes bootstrap and vanilla and builds them separately. They each build with common. There is also a separate file for setting up the default template mapping with their types and this is excluded for the no-templates build. The final output is: formly.js, formly.bootstrap.js, and formly.vanilla.js. Adding other styles will be very easy.

I also made it very simple for us to add directive templates as needed. Simply add a formly-field-buttongroup.js and formly-field-buttongroup.html and the build should pick those up. All templates should be referenced by simply: fields/formly-field-buttongroup.html (for example). Unfortunately this means that when using the non-built version of formly you have to add items to the $templateCache yourself, but people shouldn't be doing that anyway so I have no problem discouraging this. In the demo I don't have a problem doing this either as we were required to explicitly define the template urls for the types anyway.

I decided to leave the test stuff out of this. I'm going to wait until this gets merged before I work on that. Also, I've named this branch 0.1.0 because creating the no-templates build is a breaking change (as the vanilla build now exists in the formly.vanilla.js file). I believe it's time to start considering what improvements to the api we could make while we have the liberty of making breaking changes. We can keep track of the upgrade path and I don't believe it will be painful for most people.

Let me know what you think.

…ve templateless builds. Getting ready to add tests.
@ghelton
Copy link
Collaborator

ghelton commented Aug 21, 2014

Looks like a good setup to me, how do I configure the symlinks, they don't seem to work out-of-the-box? I get 404's for all of the bower_components.

@kentcdodds
Copy link
Member Author

Whoops, because the symlink was called bower_components it was ignored via the .gitignore. I think I'm going to remove that from the git ignore. Another option would be to name the symlink different, but then it's a little confusing. Want to use the symlink so we can symlink the bower_components in the test directory as well...

Anyway, what do you think about removing bower_components from the .gitignore?

@ghelton
Copy link
Collaborator

ghelton commented Aug 21, 2014

Can we change the ignore to the new location? src/bower-components

On Thu, Aug 21, 2014 at 3:58 PM, Kent C. Dodds notifications@github.com
wrote:

Whoops, because the symlink was called bower_components it was ignored via the .gitignore. I think I'm going to remove that from the git ignore. Another option would be to name the symlink different, but then it's a little confusing. Want to use the symlink so we can symlink the bower_components in the test directory as well...

Anyway, what do you think about removing bower_components from the .gitignore?

Reply to this email directly or view it on GitHub:
https://github.com/nimbly/angular-formly/pull/72#issuecomment-52996469

@kentcdodds
Copy link
Member Author

Actually, I want to keep the bower_components out of the src directory because they're more like vendor files than part of our source. Let me know if you disagree. But I think what I'll do is I'll change the place bower installs components to ignored_bower_components and we'll ignore that directory, then we'll create a symlink in the demo folder called bower_components that points to ignored_bower_components. How does that sound?

@ghelton
Copy link
Collaborator

ghelton commented Aug 21, 2014

I'm confused, in this PR they are still located in src, are you saying you want to move them out of there? If we were to just leave them there, and change .gitignore from bower_components to src/bower_components it would allow the symlink to be wherever, assuming you had it at the top level?

@kentcdodds
Copy link
Member Author

Sorry, having them in src was a mistake (part of why you were unable to run the demo). I'm about to commit my proposed change, let me know what you think of it...

@ghelton
Copy link
Collaborator

ghelton commented Aug 21, 2014

Ok sounds good

@kentcdodds
Copy link
Member Author

@Astrism, I just updated the dependencies. Feel free to check it out and merge it. I'm going to go home and may look at it later tonight. Let me know if you have any problems with what I've done. You may want to look at the build...

@ghelton
Copy link
Collaborator

ghelton commented Aug 21, 2014

Awesome, I'll take a look

ghelton added a commit that referenced this pull request Aug 21, 2014
Restructured application using simlinks in preparation for added tests.
@ghelton ghelton merged commit 3cd4ac0 into master Aug 21, 2014
@ghelton ghelton deleted the 0.1.0 branch August 21, 2014 23:30
@ghelton
Copy link
Collaborator

ghelton commented Aug 21, 2014

looks great, merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants